aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-11-16 12:50:57 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-11-16 12:52:05 -0700
commited2e4a7f138322dcf5c76138586971e228c0c3c9 (patch)
treeb0074110f18b8df90179bf4b39c6603b75d6cfce /src/Compilation.zig
parentfb99808008f2ad67122b26c0ad31ca6a0c2456cc (diff)
downloadzig-ed2e4a7f138322dcf5c76138586971e228c0c3c9.tar.gz
zig-ed2e4a7f138322dcf5c76138586971e228c0c3c9.zip
disable LTO by default on Windows when linking libc++
See #8531
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index 4fbf9933cd..7478d27ad4 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -982,6 +982,9 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
break :blk false;
} else if (options.c_source_files.len == 0) {
break :blk false;
+ } else if (options.target.os.tag == .windows and link_libcpp) {
+ // https://github.com/ziglang/zig/issues/8531
+ break :blk false;
} else switch (options.output_mode) {
.Lib, .Obj => break :blk false,
.Exe => switch (options.optimize_mode) {