Commit ed2e4a7f13

Andrew Kelley <andrew@ziglang.org>
2021-11-16 20:50:57
disable LTO by default on Windows when linking libc++
See #8531
1 parent fb99808
Changed files (1)
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) {