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 {
13861386 /// safely garbage-collected during the linking phase.
13871387 link_function_sections: bool = false,
13881388
1389 linker_allow_shlib_undefined: ?bool = null,
1390
13891391 /// Uses system Wine installation to run cross compiled Windows build artifacts.
13901392 enable_wine: bool = false,
13911393
......@@ -2338,6 +2340,9 @@ pub const LibExeObjStep = struct {
23382340 if (self.link_function_sections) {
23392341 try zig_args.append("-ffunction-sections");
23402342 }
2343 if (self.linker_allow_shlib_undefined) |x| {
2344 try zig_args.append(if (x) "--allow-shlib-undefined" else "--no-allow-shlib-undefined");
2345 }
23412346 if (self.single_threaded) {
23422347 try zig_args.append("--single-threaded");
23432348 }