This revision was automatically updated to reflect the committed changes. Closed by commit rGac1f7ab007e3: [clang] [Darwin] Add reverse mappings for aarch64/aarch64_32 to darwin arch… (authored by mstorsjo).
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79117/new/ https://reviews.llvm.org/D79117 Files: clang/lib/Driver/ToolChain.cpp clang/test/Driver/darwin-arm64-target.c Index: clang/test/Driver/darwin-arm64-target.c =================================================================== --- /dev/null +++ clang/test/Driver/darwin-arm64-target.c @@ -0,0 +1,3 @@ +// RUN: %clang -target aarch64-apple-darwin %s -miphoneos-version-min=8.0 -### 2>&1 | FileCheck %s + +// CHECK: "-cc1"{{.*}} "-triple" "arm64-apple-ios8.0.0" Index: clang/lib/Driver/ToolChain.cpp =================================================================== --- clang/lib/Driver/ToolChain.cpp +++ clang/lib/Driver/ToolChain.cpp @@ -230,9 +230,12 @@ StringRef ToolChain::getDefaultUniversalArchName() const { // In universal driver terms, the arch name accepted by -arch isn't exactly // the same as the ones that appear in the triple. Roughly speaking, this is - // an inverse of the darwin::getArchTypeForDarwinArchName() function, but the - // only interesting special case is powerpc. + // an inverse of the darwin::getArchTypeForDarwinArchName() function. switch (Triple.getArch()) { + case llvm::Triple::aarch64: + return "arm64"; + case llvm::Triple::aarch64_32: + return "arm64_32"; case llvm::Triple::ppc: return "ppc"; case llvm::Triple::ppc64:
Index: clang/test/Driver/darwin-arm64-target.c =================================================================== --- /dev/null +++ clang/test/Driver/darwin-arm64-target.c @@ -0,0 +1,3 @@ +// RUN: %clang -target aarch64-apple-darwin %s -miphoneos-version-min=8.0 -### 2>&1 | FileCheck %s + +// CHECK: "-cc1"{{.*}} "-triple" "arm64-apple-ios8.0.0" Index: clang/lib/Driver/ToolChain.cpp =================================================================== --- clang/lib/Driver/ToolChain.cpp +++ clang/lib/Driver/ToolChain.cpp @@ -230,9 +230,12 @@ StringRef ToolChain::getDefaultUniversalArchName() const { // In universal driver terms, the arch name accepted by -arch isn't exactly // the same as the ones that appear in the triple. Roughly speaking, this is - // an inverse of the darwin::getArchTypeForDarwinArchName() function, but the - // only interesting special case is powerpc. + // an inverse of the darwin::getArchTypeForDarwinArchName() function. switch (Triple.getArch()) { + case llvm::Triple::aarch64: + return "arm64"; + case llvm::Triple::aarch64_32: + return "arm64_32"; case llvm::Triple::ppc: return "ppc"; case llvm::Triple::ppc64:
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits