| ... | ... | @@ -32,6 +32,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 32 | 32 | var args = std.ArrayList([]const u8).init(arena); |
| 33 | 33 | try add_cc_args(comp, arena, &args); |
| 34 | 34 | try args.appendSlice(&[_][]const u8{ |
| 35 | "-D_SYSCRT=1", |
| 36 | "-DCRTDLL=1", |
| 35 | 37 | "-U__CRTDLL__", |
| 36 | 38 | "-D__MSVCRT__", |
| 37 | 39 | // Uncomment these 3 things for crtu |
| ... | ... | @@ -53,6 +55,8 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void { |
| 53 | 55 | var args = std.ArrayList([]const u8).init(arena); |
| 54 | 56 | try add_cc_args(comp, arena, &args); |
| 55 | 57 | try args.appendSlice(&[_][]const u8{ |
| 58 | "-D_SYSCRT=1", |
| 59 | "-DCRTDLL=1", |
| 56 | 60 | "-U__CRTDLL__", |
| 57 | 61 | "-D__MSVCRT__", |
| 58 | 62 | }); |
| ... | ... | @@ -437,11 +441,8 @@ fn findDef(comp: *Compilation, allocator: *Allocator, lib_name: []const u8) ![]u |
| 437 | 441 | const lib_path = switch (target.cpu.arch) { |
| 438 | 442 | .i386 => "lib32", |
| 439 | 443 | .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", |
| 445 | 446 | else => unreachable, |
| 446 | 447 | }; |
| 447 | 448 | |