aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-06-28 21:16:19 +0200
committerJakub Konka <kubkon@jakubkonka.com>2022-06-28 21:16:23 +0200
commitc2c1998269f8a92e39c14dabb68b253c012d56ef (patch)
tree5eefcb02f0fbfbfc1ef96048e844414807622f31 /src/main.zig
parentc02dc17618637139a5fc704c5c42723984398665 (diff)
downloadzig-c2c1998269f8a92e39c14dabb68b253c012d56ef.tar.gz
zig-c2c1998269f8a92e39c14dabb68b253c012d56ef.zip
clang: update cmdline options to include weak libs and frameworks
Clang accepts `-weak-lx`, `-weak_library x` and `-weak_framework x`.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main.zig b/src/main.zig
index ae1b95a4aa..f13fe342ca 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1625,6 +1625,8 @@ fn buildOutputType(
.entry => {
entry = it.only_arg;
},
+ .weak_library => try system_libs.put(it.only_arg, .{ .weak = true }),
+ .weak_framework => try frameworks.put(gpa, it.only_arg, .{ .weak = true }),
}
}
// Parse linker args.
@@ -4577,6 +4579,8 @@ pub const ClangArgIterator = struct {
emit_llvm,
sysroot,
entry,
+ weak_library,
+ weak_framework,
};
const Args = struct {