From e3575cdad44e63f598b557ba3142675197875906 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Tue, 13 Jul 2021 22:58:25 +0200 Subject: 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. --- src/main.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.zig') 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) -- cgit v1.2.3