authorgravatar for alichraghi@proton.meAli Chraghi <alichraghi@proton.me> 2025-02-26 15:44:28+03:30
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2025-02-26 14:39:30-05:00
log8957b2707464a4dc7f0572bfc08fd104408bc8a3
tree13b080f9f2b03636f12d44c374e412fb15f7818d
parentc45dcd013bfe9de1c739a88203349603c0682fd9

Compilation: disable ubsan_rt for spirv target


1 files changed, 2 insertions(+), 1 deletions(-)

src/Compilation.zig+2-1
...@@ -1347,7 +1347,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil...@@ -1347,7 +1347,8 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil
1347 // approach, since the ubsan runtime uses quite a lot of the standard library1347 // approach, since the ubsan runtime uses quite a lot of the standard library
1348 // and this reduces unnecessary bloat.1348 // and this reduces unnecessary bloat.
1349 const ubsan_rt_strat: RtStrat = s: {1349 const ubsan_rt_strat: RtStrat = s: {
1350 const want_ubsan_rt = options.want_ubsan_rt orelse (any_sanitize_c and is_exe_or_dyn_lib);1350 const is_spirv = options.root_mod.resolved_target.result.cpu.arch.isSpirV();
1351 const want_ubsan_rt = options.want_ubsan_rt orelse (!is_spirv and any_sanitize_c and is_exe_or_dyn_lib);
1351 if (!want_ubsan_rt) break :s .none;1352 if (!want_ubsan_rt) break :s .none;
1352 if (options.skip_linker_dependencies) break :s .none;1353 if (options.skip_linker_dependencies) break :s .none;
1353 if (have_zcu) break :s .zcu;1354 if (have_zcu) break :s .zcu;