mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
frontend: use main Compilation code_model when building libxx
as well as libtsan, libunwind, and libc files
This commit is contained in:
parent
884b1423a4
commit
37037b269e
@ -6611,6 +6611,7 @@ pub fn build_crt_file(
|
||||
.structured_cfg = comp.root_mod.structured_cfg,
|
||||
// Some libcs (e.g. musl) are opinionated about -fno-builtin.
|
||||
.no_builtin = options.no_builtin orelse comp.root_mod.no_builtin,
|
||||
.code_model = comp.root_mod.code_model,
|
||||
},
|
||||
.global = config,
|
||||
.cc_argv = &.{},
|
||||
|
||||
@ -196,6 +196,7 @@ pub fn buildLibCxx(comp: *Compilation, prog_node: std.Progress.Node) BuildError!
|
||||
.optimize_mode = optimize_mode,
|
||||
.structured_cfg = comp.root_mod.structured_cfg,
|
||||
.pic = if (target_util.supports_fpic(target)) true else null,
|
||||
.code_model = comp.root_mod.code_model,
|
||||
},
|
||||
.global = config,
|
||||
.cc_argv = &.{},
|
||||
@ -445,6 +446,7 @@ pub fn buildLibCxxAbi(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
|
||||
.structured_cfg = comp.root_mod.structured_cfg,
|
||||
.unwind_tables = unwind_tables,
|
||||
.pic = comp.root_mod.pic,
|
||||
.code_model = comp.root_mod.code_model,
|
||||
},
|
||||
.global = config,
|
||||
.cc_argv = &.{},
|
||||
|
||||
@ -105,6 +105,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
|
||||
.structured_cfg = comp.root_mod.structured_cfg,
|
||||
.pic = true,
|
||||
.no_builtin = true,
|
||||
.code_model = comp.root_mod.code_model,
|
||||
},
|
||||
.global = config,
|
||||
.cc_argv = &common_flags,
|
||||
|
||||
@ -71,6 +71,7 @@ pub fn buildStaticLib(comp: *Compilation, prog_node: std.Progress.Node) BuildErr
|
||||
.unwind_tables = unwind_tables,
|
||||
.pic = if (target_util.supports_fpic(target)) true else null,
|
||||
.optimize_mode = comp.compilerRtOptMode(),
|
||||
.code_model = comp.root_mod.code_model,
|
||||
},
|
||||
.global = config,
|
||||
.cc_argv = &.{},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user