mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
Don't link lsan rt if asan or hwasan are enabled
This commit is contained in:
parent
1b934f3e8c
commit
5976494deb
@ -1229,7 +1229,10 @@ fn add_sanitizer_libraries(
|
||||
if sanitizer.contains(SanitizerSet::DATAFLOW) {
|
||||
link_sanitizer_runtime(sess, flavor, linker, "dfsan");
|
||||
}
|
||||
if sanitizer.contains(SanitizerSet::LEAK) {
|
||||
if sanitizer.contains(SanitizerSet::LEAK)
|
||||
&& !sanitizer.contains(SanitizerSet::ADDRESS)
|
||||
&& !sanitizer.contains(SanitizerSet::HWADDRESS)
|
||||
{
|
||||
link_sanitizer_runtime(sess, flavor, linker, "lsan");
|
||||
}
|
||||
if sanitizer.contains(SanitizerSet::MEMORY) {
|
||||
|
Loading…
Reference in New Issue
Block a user