Skip to content

Commit

Permalink
stage2: Add missing defines for building dllcrt2.o
Browse files Browse the repository at this point in the history
Closes #6482
  • Loading branch information
LemonBoy committed Oct 1, 2020
1 parent 1b2d507 commit 2121716
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/mingw.zig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
var args = std.ArrayList([]const u8).init(arena);
try add_cc_args(comp, arena, &args);
try args.appendSlice(&[_][]const u8{
"-D_SYSCRT=1",
"-DCRTDLL=1",
"-U__CRTDLL__",
"-D__MSVCRT__",
// Uncomment these 3 things for crtu
Expand All @@ -53,6 +55,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
var args = std.ArrayList([]const u8).init(arena);
try add_cc_args(comp, arena, &args);
try args.appendSlice(&[_][]const u8{
"-D_SYSCRT=1",
"-DCRTDLL=1",
"-U__CRTDLL__",
"-D__MSVCRT__",
});
Expand Down Expand Up @@ -437,11 +441,8 @@ fn findDef(comp: *Compilation, allocator: *Allocator, lib_name: []const u8) ![]u
const lib_path = switch (target.cpu.arch) {
.i386 => "lib32",
.x86_64 => "lib64",
.arm, .armeb => switch (target.cpu.arch.ptrBitWidth()) {
32 => "libarm32",
64 => "libarm64",
else => unreachable,
},
.arm, .armeb, .thumb, .thumbeb, .aarch64_32 => "libarm32",
.aarch64, .aarch64_be => "libarm64",
else => unreachable,
};

Expand Down

0 comments on commit 2121716

Please sign in to comment.