motiejus/zig

fork of https://codeberg.org/ziglang/zig
git clone https://git.jakstys.lt/motiejus/zig.git
Log | Tree | Refs | README | LICENSE

commit ed2e4a7f138322dcf5c76138586971e228c0c3c9 (tree)
parent fb99808008f2ad67122b26c0ad31ca6a0c2456cc
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 16 Nov 2021 12:50:57 -0700

disable LTO by default on Windows when linking libc++

See #8531

Diffstat:
Msrc/Compilation.zig | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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) {