| author | |
| committer | |
| log | f04799dc9c60189b11f0bbcd4f0027b9928ef6e4 |
| tree | 5023c546e3b866b34330d6f71b10b1206013b95d |
| parent | 7ee6e7d61edcd19c594cb40fdb64703f58e32994 |
FIxes #32127
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/353112 files changed, 8 insertions(+), 0 deletions(-)
src/Compilation/Config.zig+7| ... | ... | @@ -146,6 +146,7 @@ pub const ResolveError = error{ |
| 146 | 146 | DynamicLibraryPrecludesPie, |
| 147 | 147 | TargetRequiresPie, |
| 148 | 148 | SanitizeThreadRequiresPie, |
| 149 | SanitizeThreadRequiresLlvmBackend, | |
| 149 | 150 | BackendLacksErrorTracing, |
| 150 | 151 | LlvmLibraryUnavailable, |
| 151 | 152 | LldUnavailable, |
| ... | ... | @@ -342,6 +343,12 @@ pub fn resolve(options: Options) ResolveError!Config { |
| 342 | 343 | break :b true; |
| 343 | 344 | } |
| 344 | 345 | |
| 346 | if (options.any_sanitize_thread) { | |
| 347 | // Thread sanitization instrumentation requires the LLVM backend. | |
| 348 | if (options.use_llvm == false) return error.SanitizeThreadRequiresLlvmBackend; | |
| 349 | break :b true; | |
| 350 | } | |
| 351 | ||
| 345 | 352 | if (options.use_llvm) |x| break :b x; |
| 346 | 353 | |
| 347 | 354 | // If we cannot use LLVM libraries, then our own backends will be a |
src/main.zig+1| ... | ... | @@ -4131,6 +4131,7 @@ fn createModule( |
| 4131 | 4131 | error.DynamicLibraryPrecludesPie => fatal("dynamic libraries cannot be position independent executables", .{}), |
| 4132 | 4132 | error.TargetRequiresPie => fatal("the specified target requires position independent executables", .{}), |
| 4133 | 4133 | error.SanitizeThreadRequiresPie => fatal("thread sanitization requires position independent executables", .{}), |
| 4134 | error.SanitizeThreadRequiresLlvmBackend => fatal("thread sanitization requires the LLVM backend", .{}), | |
| 4134 | 4135 | error.BackendLacksErrorTracing => fatal("the selected backend has not yet implemented error return tracing", .{}), |
| 4135 | 4136 | error.LlvmLibraryUnavailable => fatal("zig was compiled without LLVM libraries", .{}), |
| 4136 | 4137 | error.LldUnavailable => fatal("zig was compiled without LLD libraries", .{}), |