mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add arm64_32 support for Swift
Commit the platform definition and build script work necessary to cross-compile for arm64_32. arm64_32 is a variant of AARCH64 that supports an ILP32 architecture.
This commit is contained in:
@@ -58,6 +58,7 @@ static const SupportedConditionalValue SupportedConditionalCompilationOSs[] = {
|
||||
static const SupportedConditionalValue SupportedConditionalCompilationArches[] = {
|
||||
"arm",
|
||||
"arm64",
|
||||
"arm64_32",
|
||||
"i386",
|
||||
"x86_64",
|
||||
"powerpc64",
|
||||
@@ -303,7 +304,12 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
|
||||
addPlatformConditionValue(PlatformConditionKind::Arch, "arm");
|
||||
break;
|
||||
case llvm::Triple::ArchType::aarch64:
|
||||
addPlatformConditionValue(PlatformConditionKind::Arch, "arm64");
|
||||
case llvm::Triple::ArchType::aarch64_32:
|
||||
if (Target.getArchName() == "arm64_32") {
|
||||
addPlatformConditionValue(PlatformConditionKind::Arch, "arm64_32");
|
||||
} else {
|
||||
addPlatformConditionValue(PlatformConditionKind::Arch, "arm64");
|
||||
}
|
||||
break;
|
||||
case llvm::Triple::ArchType::ppc64:
|
||||
addPlatformConditionValue(PlatformConditionKind::Arch, "powerpc64");
|
||||
@@ -336,6 +342,7 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
|
||||
case llvm::Triple::ArchType::arm:
|
||||
case llvm::Triple::ArchType::thumb:
|
||||
case llvm::Triple::ArchType::aarch64:
|
||||
case llvm::Triple::ArchType::aarch64_32:
|
||||
case llvm::Triple::ArchType::ppc64le:
|
||||
case llvm::Triple::ArchType::wasm32:
|
||||
case llvm::Triple::ArchType::x86:
|
||||
|
||||
Reference in New Issue
Block a user