| ... | @@ -92,6 +92,10 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { | ... | @@ -92,6 +92,10 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 92 | "-D_WIN32_WINNT=0x0f00", | 92 | "-D_WIN32_WINNT=0x0f00", |
| 93 | "-D__MSVCRT_VERSION__=0x700", | 93 | "-D__MSVCRT_VERSION__=0x700", |
| 94 | }); | 94 | }); |
| | 95 | if (std.mem.eql(u8, dep, "tlssup.c")) { |
| | 96 | // Can't let LTO drop symbols defined in this file (eg: _tls_index) |
| | 97 | try args.append("-fno-lto"); |
| | 98 | } |
| 95 | c_source_files[i] = .{ | 99 | c_source_files[i] = .{ |
| 96 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ | 100 | .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{ |
| 97 | "libc", "mingw", "crt", dep, | 101 | "libc", "mingw", "crt", dep, |