| ... | @@ -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 crtu | 39 | // 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 | }; |
| 447 | | 448 | |