mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
Add LibExeObjStep.linker_allow_shlib_undefined field to set --allow-shlib-undefined
This commit is contained in:
parent
0e687d125b
commit
99e7ba24b1
@ -1386,6 +1386,8 @@ pub const LibExeObjStep = struct {
|
||||
/// safely garbage-collected during the linking phase.
|
||||
link_function_sections: bool = false,
|
||||
|
||||
linker_allow_shlib_undefined: ?bool = null,
|
||||
|
||||
/// Uses system Wine installation to run cross compiled Windows build artifacts.
|
||||
enable_wine: bool = false,
|
||||
|
||||
@ -2338,6 +2340,9 @@ pub const LibExeObjStep = struct {
|
||||
if (self.link_function_sections) {
|
||||
try zig_args.append("-ffunction-sections");
|
||||
}
|
||||
if (self.linker_allow_shlib_undefined) |x| {
|
||||
try zig_args.append(if (x) "--allow-shlib-undefined" else "--no-allow-shlib-undefined");
|
||||
}
|
||||
if (self.single_threaded) {
|
||||
try zig_args.append("--single-threaded");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user