aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2021-03-22 23:30:05 +1100
committerIsaac Freund <ifreund@ifreund.xyz>2021-04-16 22:51:51 +0200
commit0e687d125bac2b0a282c01c39963ad22426b8147 (patch)
tree3a2a212b9d16e4bcfb70228136415cb35a003c14 /src/main.zig
parent140d9df99b08d0a08e91019fa64e4a452b363101 (diff)
downloadzig-0e687d125bac2b0a282c01c39963ad22426b8147.tar.gz
zig-0e687d125bac2b0a282c01c39963ad22426b8147.zip
Add --(no-)allow-shlib-undefined to supported zig linking flags
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index cf0d08c5ed..5f9a97459f 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -344,6 +344,8 @@ const usage_build_generic =
\\ --emit-relocs Enable output of relocation sections for post build tools
\\ -dynamic Force output to be dynamically linked
\\ -static Force output to be statically linked
+ \\ --allow-shlib-undefined Allows undefined symbols in shared libraries
+ \\ --no-allow-shlib-undefined Disallows undefined symbols in shared libraries
\\ -Bsymbolic Bind global references locally
\\ --subsystem [subsystem] (Windows) /SUBSYSTEM:<subsystem> to the linker
\\ --stack [size] Override default stack size
@@ -973,6 +975,10 @@ fn buildOutputType(
link_eh_frame_hdr = true;
} else if (mem.eql(u8, arg, "--emit-relocs")) {
link_emit_relocs = true;
+ } else if (mem.eql(u8, arg, "--allow-shlib-undefined")) {
+ linker_allow_shlib_undefined = true;
+ } else if (mem.eql(u8, arg, "--no-allow-shlib-undefined")) {
+ linker_allow_shlib_undefined = false;
} else if (mem.eql(u8, arg, "-Bsymbolic")) {
linker_bind_global_refs_locally = true;
} else if (mem.eql(u8, arg, "--verbose-link")) {