Revert "Swift: print a helpful message on macOS ARM"

This commit is contained in:
Paolo Tranquilli
2022-09-14 10:34:46 +02:00
committed by GitHub
parent 6074f22d3f
commit dad0e4decc
2 changed files with 17 additions and 10 deletions

View File

@@ -1,18 +1,21 @@
package(default_visibility = ["//swift:__subpackages__"])
#TODO we will be introducing universal binaries at a later stage, when we have both architectures prebuilt for macOS
# for the moment, we require --cpu=darwin_x86_64 on an ARM macOS
# for the moment, we make arm build an x86_64 binary
_arch_override = {
"darwin_arm64": "darwin_x86_64",
}
[
alias(
name = name,
actual = select(
{
"@bazel_tools//src/conditions:%s" % arch: "@swift_prebuilt_%s//:%s" % (arch, name)
for arch in ("linux", "darwin_x86_64")
},
no_match_error = "Unsupported platform. Support for the ARM macOS platform is still a todo, " +
"please pass --cpu=darwin_x86_64 for the time being",
),
actual = select({
"@bazel_tools//src/conditions:%s" % arch: "@swift_prebuilt_%s//:%s" % (
_arch_override.get(arch, arch),
name,
)
for arch in ("linux", "darwin_x86_64", "darwin_arm64")
}),
)
for name in ("swift-llvm-support", "swift-test-sdk")
]