aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Volkman <jeremy@cedarai.com>2022-12-27 08:15:09 -0800
committerJeremy Volkman <jeremy@cedarai.com>2022-12-27 08:18:04 -0800
commitb0bfde917b31fbf41775d5fd8e8bc2e7e98bbf4b (patch)
treefed6460d7ab05db8f8b211b3c73889c0c2498f9b
parenta70cbe779adb11faeb88ceffad0cfa729d2eec6e (diff)
downloadzig-b0bfde917b31fbf41775d5fd8e8bc2e7e98bbf4b.tar.gz
zig-b0bfde917b31fbf41775d5fd8e8bc2e7e98bbf4b.zip
Add support for -undefined error
`-undefined dynamic_lookup` was added in #13991. `-undefined error` is the opposite, and can be used to revert an `-undefined dynamic_lookup` flag specified previously on the command line.
-rw-r--r--src/main.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index ec0eb74e93..b2caf40c6a 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1703,6 +1703,8 @@ fn buildOutputType(
.undefined => {
if (mem.eql(u8, "dynamic_lookup", it.only_arg)) {
linker_allow_shlib_undefined = true;
+ } else if (mem.eql(u8, "error", it.only_arg)) {
+ linker_allow_shlib_undefined = false;
} else {
fatal("unsupported -undefined option '{s}'", .{it.only_arg});
}