authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2021-03-22 23:30:05+11:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-04-16 22:51:51+02:00
log0e687d125bac2b0a282c01c39963ad22426b8147
tree3a2a212b9d16e4bcfb70228136415cb35a003c14
parent140d9df99b08d0a08e91019fa64e4a452b363101

Add --(no-)allow-shlib-undefined to supported zig linking flags


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

src/main.zig+6
...@@ -344,6 +344,8 @@ const usage_build_generic =...@@ -344,6 +344,8 @@ const usage_build_generic =
344 \\ --emit-relocs Enable output of relocation sections for post build tools344 \\ --emit-relocs Enable output of relocation sections for post build tools
345 \\ -dynamic Force output to be dynamically linked345 \\ -dynamic Force output to be dynamically linked
346 \\ -static Force output to be statically linked346 \\ -static Force output to be statically linked
347 \\ --allow-shlib-undefined Allows undefined symbols in shared libraries
348 \\ --no-allow-shlib-undefined Disallows undefined symbols in shared libraries
347 \\ -Bsymbolic Bind global references locally349 \\ -Bsymbolic Bind global references locally
348 \\ --subsystem [subsystem] (Windows) /SUBSYSTEM:<subsystem> to the linker350 \\ --subsystem [subsystem] (Windows) /SUBSYSTEM:<subsystem> to the linker
349 \\ --stack [size] Override default stack size351 \\ --stack [size] Override default stack size
...@@ -973,6 +975,10 @@ fn buildOutputType(...@@ -973,6 +975,10 @@ fn buildOutputType(
973 link_eh_frame_hdr = true;975 link_eh_frame_hdr = true;
974 } else if (mem.eql(u8, arg, "--emit-relocs")) {976 } else if (mem.eql(u8, arg, "--emit-relocs")) {
975 link_emit_relocs = true;977 link_emit_relocs = true;
978 } else if (mem.eql(u8, arg, "--allow-shlib-undefined")) {
979 linker_allow_shlib_undefined = true;
980 } else if (mem.eql(u8, arg, "--no-allow-shlib-undefined")) {
981 linker_allow_shlib_undefined = false;
976 } else if (mem.eql(u8, arg, "-Bsymbolic")) {982 } else if (mem.eql(u8, arg, "-Bsymbolic")) {
977 linker_bind_global_refs_locally = true;983 linker_bind_global_refs_locally = true;
978 } else if (mem.eql(u8, arg, "--verbose-link")) {984 } else if (mem.eql(u8, arg, "--verbose-link")) {