authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-16 12:50:57-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-11-16 12:52:05-07:00
loged2e4a7f138322dcf5c76138586971e228c0c3c9
treeb0074110f18b8df90179bf4b39c6603b75d6cfce
parentfb99808008f2ad67122b26c0ad31ca6a0c2456cc

disable LTO by default on Windows when linking libc++

See #8531

1 files changed, 3 insertions(+), 0 deletions(-)

src/Compilation.zig+3
...@@ -982,6 +982,9 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {...@@ -982,6 +982,9 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation {
982 break :blk false;982 break :blk false;
983 } else if (options.c_source_files.len == 0) {983 } else if (options.c_source_files.len == 0) {
984 break :blk false;984 break :blk false;
985 } else if (options.target.os.tag == .windows and link_libcpp) {
986 // https://github.com/ziglang/zig/issues/8531
987 break :blk false;
985 } else switch (options.output_mode) {988 } else switch (options.output_mode) {
986 .Lib, .Obj => break :blk false,989 .Lib, .Obj => break :blk false,
987 .Exe => switch (options.optimize_mode) {990 .Exe => switch (options.optimize_mode) {