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 {
3232 var args = std.ArrayList([]const u8).init(arena);
3333 try add_cc_args(comp, arena, &args);
3434 try args.appendSlice(&[_][]const u8{
35 "-D_SYSCRT=1",
36 "-DCRTDLL=1",
3537 "-U__CRTDLL__",
3638 "-D__MSVCRT__",
3739 // Uncomment these 3 things for crtu
......@@ -53,6 +55,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
5355 var args = std.ArrayList([]const u8).init(arena);
5456 try add_cc_args(comp, arena, &args);
5557 try args.appendSlice(&[_][]const u8{
58 "-D_SYSCRT=1",
59 "-DCRTDLL=1",
5660 "-U__CRTDLL__",
5761 "-D__MSVCRT__",
5862 });
......@@ -437,11 +441,8 @@ fn findDef(comp: *Compilation, allocator: *Allocator, lib_name: []const u8) ![]u
437441 const lib_path = switch (target.cpu.arch) {
438442 .i386 => "lib32",
439443 .x86_64 => "lib64",
440 .arm, .armeb => switch (target.cpu.arch.ptrBitWidth()) {
441 32 => "libarm32",
442 64 => "libarm64",
443 else => unreachable,
444 },
444 .arm, .armeb, .thumb, .thumbeb, .aarch64_32 => "libarm32",
445 .aarch64, .aarch64_be => "libarm64",
445446 else => unreachable,
446447 };
447448