aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2021-07-13 23:20:51 +0200
committerJakub Konka <kubkon@jakubkonka.com>2021-07-15 18:49:47 +0200
commit9ca69c51e76525e1e753588375036ea711f72df0 (patch)
tree8ffc99b93a6a3287abc7d61fde5db094c8924253 /src/main.zig
parente3575cdad44e63f598b557ba3142675197875906 (diff)
downloadzig-9ca69c51e76525e1e753588375036ea711f72df0.tar.gz
zig-9ca69c51e76525e1e753588375036ea711f72df0.zip
zld: error out if LTO is requested targeting Darwin
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index 9d515cc398..ae39b9c167 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -1648,7 +1648,13 @@ 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.", .{});
+ fatal("LLD requested with Mach-O object format. Only the self-hosted linker is supported for this target.", .{});
+ }
+ }
+
+ if (want_lto) |opt| {
+ if (opt and cross_target.isDarwin()) {
+ fatal("LTO is not yet supported with the Mach-O object format. More details: https://github.com/ziglang/zig/issues/8680", .{});
}
}