mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
ubsan: don't create ubsan in every static lib by default
Problem here is if zig is asked to create multiple static libraries, it will build the runtime multiple times and then they will conflict. Instead we want to build the runtime exactly once.
This commit is contained in:
parent
d4413e3504
commit
e18c7f9cca
1 changed files with 1 additions and 1 deletions
|
|
@ -1347,7 +1347,7 @@ 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 output_mode != .Obj);
|
||||
const want_ubsan_rt = options.want_ubsan_rt orelse (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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue