From: Logan Chien Date: Wed, 23 Apr 2014 13:36:23 +0000 (+0000) Subject: Add aarch64-linux-android triple for Android. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2f62fa5de05e1c248c0f45e352732385b0f2f7a;p=clang Add aarch64-linux-android triple for Android. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206979 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp index 52c58470cf..9465be8778 100644 --- a/lib/Driver/ToolChains.cpp +++ b/lib/Driver/ToolChains.cpp @@ -1322,7 +1322,8 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const { // lifetime or initialization issues. static const char *const AArch64LibDirs[] = { "/lib" }; static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu", - "aarch64-linux-gnu" }; + "aarch64-linux-gnu", + "aarch64-linux-android" }; static const char *const AArch64beLibDirs[] = { "/lib" }; static const char *const AArch64beTriples[] = { "aarch64_be-none-linux-gnu", "aarch64_be-linux-gnu" }; diff --git a/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/bin/.keep b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/bin/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/include/c++/4.8/.keep b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/include/c++/4.8/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/lib/.keep b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/lib/.keep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test/Driver/android-standalone.cpp b/test/Driver/android-standalone.cpp index dc41ed7559..87eaf9c90c 100644 --- a/test/Driver/android-standalone.cpp +++ b/test/Driver/android-standalone.cpp @@ -17,6 +17,21 @@ // CHECK: "-L{{.*}}/sysroot/usr/lib" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target aarch64-linux-android \ +// RUN: -B%S/Inputs/basic_android_tree \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: | FileCheck --check-prefix=CHECK-AARCH64 %s +// CHECK-AARCH64: {{.*}}clang{{.*}}" "-cc1" +// CHECK-AARCH64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8" +// CHECK-AARCH64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8/aarch64-linux-android" +// CHECK-AARCH64: "-internal-externc-isystem" "{{.*}}/sysroot/include" +// CHECK-AARCH64: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" +// CHECK-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-AARCH64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8" +// CHECK-AARCH64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8/../../../../aarch64-linux-android/lib" +// CHECK-AARCH64: "-L{{.*}}/sysroot/usr/lib" +// +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -target mipsel-linux-android \ // RUN: -mips32 \ // RUN: -B%S/Inputs/basic_android_tree \ diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c index ca390d9b3b..46fec499e9 100644 --- a/test/Driver/linux-ld.c +++ b/test/Driver/linux-ld.c @@ -592,6 +592,10 @@ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-linux-android \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mipsel-linux-android \ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s @@ -626,6 +630,11 @@ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-linux-android \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: -shared \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mipsel-linux-android \ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: -shared \ @@ -665,6 +674,11 @@ // RUN: -static \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-linux-android \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: -static \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mipsel-linux-android \ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: -static \ @@ -703,6 +717,11 @@ // RUN: -pie \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-linux-android \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: -pie \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mipsel-linux-android \ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: -pie \ @@ -742,6 +761,10 @@ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: --target=aarch64-linux-android \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=mips64el-linux-android \ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s