authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-10-01 11:38:19+02:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-10-01 11:39:22+02:00
log212171643c0cd0c9065f0e7322b4d373f51a089b
tree333a1d27d178c58a7dc2b644a130bfd367424927
parent1b2d50737a9cfd0af2e219db08aec66bdf259f2d

stage2: Add missing defines for building dllcrt2.o

Closes #6482

1 files changed, 6 insertions(+), 5 deletions(-)

src/mingw.zig+6-5
...@@ -32,6 +32,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {...@@ -32,6 +32,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
32 var args = std.ArrayList([]const u8).init(arena);32 var args = std.ArrayList([]const u8).init(arena);
33 try add_cc_args(comp, arena, &args);33 try add_cc_args(comp, arena, &args);
34 try args.appendSlice(&[_][]const u8{34 try args.appendSlice(&[_][]const u8{
35 "-D_SYSCRT=1",
36 "-DCRTDLL=1",
35 "-U__CRTDLL__",37 "-U__CRTDLL__",
36 "-D__MSVCRT__",38 "-D__MSVCRT__",
37 // Uncomment these 3 things for crtu39 // Uncomment these 3 things for crtu
...@@ -53,6 +55,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {...@@ -53,6 +55,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
53 var args = std.ArrayList([]const u8).init(arena);55 var args = std.ArrayList([]const u8).init(arena);
54 try add_cc_args(comp, arena, &args);56 try add_cc_args(comp, arena, &args);
55 try args.appendSlice(&[_][]const u8{57 try args.appendSlice(&[_][]const u8{
58 "-D_SYSCRT=1",
59 "-DCRTDLL=1",
56 "-U__CRTDLL__",60 "-U__CRTDLL__",
57 "-D__MSVCRT__",61 "-D__MSVCRT__",
58 });62 });
...@@ -437,11 +441,8 @@ fn findDef(comp: *Compilation, allocator: *Allocator, lib_name: []const u8) ![]u...@@ -437,11 +441,8 @@ fn findDef(comp: *Compilation, allocator: *Allocator, lib_name: []const u8) ![]u
437 const lib_path = switch (target.cpu.arch) {441 const lib_path = switch (target.cpu.arch) {
438 .i386 => "lib32",442 .i386 => "lib32",
439 .x86_64 => "lib64",443 .x86_64 => "lib64",
440 .arm, .armeb => switch (target.cpu.arch.ptrBitWidth()) {444 .arm, .armeb, .thumb, .thumbeb, .aarch64_32 => "libarm32",
441 32 => "libarm32",445 .aarch64, .aarch64_be => "libarm64",
442 64 => "libarm64",
443 else => unreachable,
444 },
445 else => unreachable,446 else => unreachable,
446 };447 };
447448