diff options
| author | Ali Cheraghi <alichraghi@proton.me> | 2025-02-26 15:44:28 +0330 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-02-26 14:39:30 -0500 |
| commit | 8957b2707464a4dc7f0572bfc08fd104408bc8a3 (patch) | |
| tree | 13b080f9f2b03636f12d44c374e412fb15f7818d /src/Compilation.zig | |
| parent | c45dcd013bfe9de1c739a88203349603c0682fd9 (diff) | |
| download | zig-8957b2707464a4dc7f0572bfc08fd104408bc8a3.tar.gz zig-8957b2707464a4dc7f0572bfc08fd104408bc8a3.zip | |
Compilation: disable ubsan_rt for spirv target
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index a88063b952..969a399640 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1347,7 +1347,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil // approach, since the ubsan runtime uses quite a lot of the standard library // and this reduces unnecessary bloat. const ubsan_rt_strat: RtStrat = s: { - const want_ubsan_rt = options.want_ubsan_rt orelse (any_sanitize_c and is_exe_or_dyn_lib); + const is_spirv = options.root_mod.resolved_target.result.cpu.arch.isSpirV(); + const want_ubsan_rt = options.want_ubsan_rt orelse (!is_spirv and any_sanitize_c and is_exe_or_dyn_lib); if (!want_ubsan_rt) break :s .none; if (options.skip_linker_dependencies) break :s .none; if (have_zcu) break :s .zcu; |
