aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-07-13 22:58:25 +0200
committerJakub Konka <kubkon@jakubkonka.com>2021-07-15 18:49:47 +0200
commite3575cdad44e63f598b557ba3142675197875906 (patch)
tree000783a9e8eb1feb1a77aebfa458a0d52e200723 /src/main.zig
parent398672eb30dce08bd3370cde7adeb503c64a4892 (diff)
downloadzig-e3575cdad44e63f598b557ba3142675197875906.tar.gz
zig-e3575cdad44e63f598b557ba3142675197875906.zip
zld: decommision use_lld for MachO
Invoke `linkAsArchive` directly in MachO backend when LLVM is available and we are asked to create a static lib.
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 2b961bb64c..9d515cc398 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1646,6 +1646,12 @@ fn buildOutputType(
}
}
+ if (use_lld) |opt| {
+ if (opt and cross_target.isDarwin()) {
+ fatal("-fLLD requested with Mach-O object format. Only the self-hosted linker is supported for this target.", .{});
+ }
+ }
+
if (comptime std.Target.current.isDarwin()) {
// If we want to link against frameworks, we need system headers.
if (framework_dirs.items.len > 0 or frameworks.items.len > 0)