aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-10-19 00:36:16 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-10-23 16:27:38 -0700
commitab33d2e7a90346be43693a7dd0e2276e894a67ba (patch)
tree2a663d22cc467d731ccda3bd19cabfdef7061da7
parent3cc19cd86518f8ae2a7bd48577d30577cfbbd391 (diff)
downloadzig-ab33d2e7a90346be43693a7dd0e2276e894a67ba.tar.gz
zig-ab33d2e7a90346be43693a7dd0e2276e894a67ba.zip
add missing check for output mode in tsan logic
-rw-r--r--src/Compilation.zig10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 870d5faf8f..a4d464068e 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -1886,7 +1886,7 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
try comp.queueJob(.libcxx);
try comp.queueJob(.libcxxabi);
}
- if (build_options.have_llvm and comp.config.any_sanitize_thread) {
+ if (build_options.have_llvm and is_exe_or_dyn_lib and comp.config.any_sanitize_thread) {
try comp.queueJob(.libtsan);
}
@@ -1914,11 +1914,9 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
}
}
- if (comp.config.any_fuzz and capable_of_building_compiler_rt) {
- if (is_exe_or_dyn_lib) {
- log.debug("queuing a job to build libfuzzer", .{});
- comp.job_queued_fuzzer_lib = true;
- }
+ if (is_exe_or_dyn_lib and comp.config.any_fuzz and capable_of_building_compiler_rt) {
+ log.debug("queuing a job to build libfuzzer", .{});
+ comp.job_queued_fuzzer_lib = true;
}
}