| ... | @@ -403,9 +403,9 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile, prog_node: std.Progre | ... | @@ -403,9 +403,9 @@ pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile, prog_node: std.Progre |
| 403 | | 403 | |
| 404 | fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![]const u8 { | 404 | fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![]const u8 { |
| 405 | const arch = comp.getTarget().cpu.arch; | 405 | const arch = comp.getTarget().cpu.arch; |
| 406 | const is_ppc = arch == .powerpc or arch == .powerpc64 or arch == .powerpc64le; | 406 | const is_ppc = arch.isPowerPC(); |
| 407 | const is_aarch64 = arch == .aarch64 or arch == .aarch64_be; | 407 | const is_aarch64 = arch.isAARCH64(); |
| 408 | const is_sparc = arch == .sparc or arch == .sparc64; | 408 | const is_sparc = arch.isSPARC(); |
| 409 | const is_64 = comp.getTarget().ptrBitWidth() == 64; | 409 | const is_64 = comp.getTarget().ptrBitWidth() == 64; |
| 410 | | 410 | |
| 411 | const s = path.sep_str; | 411 | const s = path.sep_str; |
| ... | @@ -423,7 +423,7 @@ fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![ | ... | @@ -423,7 +423,7 @@ fn start_asm_path(comp: *Compilation, arena: Allocator, basename: []const u8) ![ |
| 423 | try result.appendSlice("sparc" ++ s ++ "sparc32"); | 423 | try result.appendSlice("sparc" ++ s ++ "sparc32"); |
| 424 | } | 424 | } |
| 425 | } | 425 | } |
| 426 | } else if (arch.isARM()) { | 426 | } else if (arch.isArmOrThumb()) { |
| 427 | try result.appendSlice("arm"); | 427 | try result.appendSlice("arm"); |
| 428 | } else if (arch.isMIPS()) { | 428 | } else if (arch.isMIPS()) { |
| 429 | if (!mem.eql(u8, basename, "crti.S") and !mem.eql(u8, basename, "crtn.S")) { | 429 | if (!mem.eql(u8, basename, "crti.S") and !mem.eql(u8, basename, "crtn.S")) { |
| ... | @@ -540,10 +540,10 @@ fn add_include_dirs_arch( | ... | @@ -540,10 +540,10 @@ fn add_include_dirs_arch( |
| 540 | dir: []const u8, | 540 | dir: []const u8, |
| 541 | ) error{OutOfMemory}!void { | 541 | ) error{OutOfMemory}!void { |
| 542 | const arch = target.cpu.arch; | 542 | const arch = target.cpu.arch; |
| 543 | const is_x86 = arch == .x86 or arch == .x86_64; | 543 | const is_x86 = arch.isX86(); |
| 544 | const is_aarch64 = arch == .aarch64 or arch == .aarch64_be; | 544 | const is_aarch64 = arch.isAARCH64(); |
| 545 | const is_ppc = arch == .powerpc or arch == .powerpc64 or arch == .powerpc64le; | 545 | const is_ppc = arch.isPowerPC(); |
| 546 | const is_sparc = arch == .sparc or arch == .sparc64; | 546 | const is_sparc = arch.isSPARC(); |
| 547 | const is_64 = target.ptrBitWidth() == 64; | 547 | const is_64 = target.ptrBitWidth() == 64; |
| 548 | | 548 | |
| 549 | const s = path.sep_str; | 549 | const s = path.sep_str; |
| ... | @@ -573,7 +573,7 @@ fn add_include_dirs_arch( | ... | @@ -573,7 +573,7 @@ fn add_include_dirs_arch( |
| 573 | try args.append("-I"); | 573 | try args.append("-I"); |
| 574 | try args.append(try path.join(arena, &[_][]const u8{ dir, "x86" })); | 574 | try args.append(try path.join(arena, &[_][]const u8{ dir, "x86" })); |
| 575 | } | 575 | } |
| 576 | } else if (arch.isARM()) { | 576 | } else if (arch.isArmOrThumb()) { |
| 577 | if (opt_nptl) |nptl| { | 577 | if (opt_nptl) |nptl| { |
| 578 | try args.append("-I"); | 578 | try args.append("-I"); |
| 579 | try args.append(try path.join(arena, &[_][]const u8{ dir, "arm", nptl })); | 579 | try args.append(try path.join(arena, &[_][]const u8{ dir, "arm", nptl })); |