Skip to content

Commit d8c42f6

Browse files
authored
swift: use aarch64 instead of arm64 on Linux (#404263)
2 parents c1f224f + e3895da commit d8c42f6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkgs/development/compilers/swift/compiler/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@ let
7272
else
7373
targetPlatform.parsed.kernel.name;
7474

75-
swiftArch = stdenv.hostPlatform.darwinArch;
75+
# This causes swiftPackages.XCTest to fail to build on aarch64-linux
76+
# as I believe this is because Apple calls the architecture aarch64
77+
# on Linux rather than arm64 when used with macOS.
78+
swiftArch =
79+
if hostPlatform.isDarwin then hostPlatform.darwinArch else targetPlatform.parsed.cpu.name;
7680

7781
# On Darwin, a `.swiftmodule` is a subdirectory in `lib/swift/<OS>`,
7882
# containing binaries for supported archs. On other platforms, binaries are

0 commit comments

Comments
 (0)