authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-03-22 23:34:37+11:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-04-16 22:51:51+02:00
log99e7ba24b17d9b0a948c8fd01904d3597b5d4f84
tree2fa6f400a62eff48fe202bb6582d6b409a5c6315
parent0e687d125bac2b0a282c01c39963ad22426b8147

Add LibExeObjStep.linker_allow_shlib_undefined field to set --allow-shlib-undefined


1 files changed, 5 insertions(+), 0 deletions(-)

lib/std/build.zig+5
...@@ -1386,6 +1386,8 @@ pub const LibExeObjStep = struct {...@@ -1386,6 +1386,8 @@ pub const LibExeObjStep = struct {
1386 /// safely garbage-collected during the linking phase.1386 /// safely garbage-collected during the linking phase.
1387 link_function_sections: bool = false,1387 link_function_sections: bool = false,
13881388
1389 linker_allow_shlib_undefined: ?bool = null,
1390
1389 /// Uses system Wine installation to run cross compiled Windows build artifacts.1391 /// Uses system Wine installation to run cross compiled Windows build artifacts.
1390 enable_wine: bool = false,1392 enable_wine: bool = false,
13911393
...@@ -2338,6 +2340,9 @@ pub const LibExeObjStep = struct {...@@ -2338,6 +2340,9 @@ pub const LibExeObjStep = struct {
2338 if (self.link_function_sections) {2340 if (self.link_function_sections) {
2339 try zig_args.append("-ffunction-sections");2341 try zig_args.append("-ffunction-sections");
2340 }2342 }
2343 if (self.linker_allow_shlib_undefined) |x| {
2344 try zig_args.append(if (x) "--allow-shlib-undefined" else "--no-allow-shlib-undefined");
2345 }
2341 if (self.single_threaded) {2346 if (self.single_threaded) {
2342 try zig_args.append("--single-threaded");2347 try zig_args.append("--single-threaded");
2343 }2348 }