1f4a2713aSLionel Sambuc // Test header and library paths when Clang is used with Android standalone 2f4a2713aSLionel Sambuc // toolchain. 3f4a2713aSLionel Sambuc // 4f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 5f4a2713aSLionel Sambuc // RUN: -target arm-linux-androideabi \ 6f4a2713aSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 7f4a2713aSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 8f4a2713aSLionel Sambuc // RUN: | FileCheck %s 9f4a2713aSLionel Sambuc // CHECK: {{.*}}clang{{.*}}" "-cc1" 10f4a2713aSLionel Sambuc // CHECK: "-internal-isystem" "{{.*}}/arm-linux-androideabi/include/c++/4.4.3" 11f4a2713aSLionel Sambuc // CHECK: "-internal-isystem" "{{.*}}/arm-linux-androideabi/include/c++/4.4.3/arm-linux-androideabi" 12f4a2713aSLionel Sambuc // CHECK: "-internal-externc-isystem" "{{.*}}/sysroot/include" 13f4a2713aSLionel Sambuc // CHECK: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 14f4a2713aSLionel Sambuc // CHECK: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 15f4a2713aSLionel Sambuc // CHECK: "-L{{.*}}/lib/gcc/arm-linux-androideabi/4.4.3" 16f4a2713aSLionel Sambuc // CHECK: "-L{{.*}}/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/lib" 17f4a2713aSLionel Sambuc // CHECK: "-L{{.*}}/sysroot/usr/lib" 18f4a2713aSLionel Sambuc // 19f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 20*0a6a1f1dSLionel Sambuc // RUN: -target aarch64-linux-android \ 21*0a6a1f1dSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 22*0a6a1f1dSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 23*0a6a1f1dSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-AARCH64 %s 24*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: {{.*}}clang{{.*}}" "-cc1" 25*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8" 26*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8/aarch64-linux-android" 27*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-internal-externc-isystem" "{{.*}}/sysroot/include" 28*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 29*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 30*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8" 31*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8/../../../../aarch64-linux-android/lib" 32*0a6a1f1dSLionel Sambuc // CHECK-AARCH64: "-L{{.*}}/sysroot/usr/lib" 33*0a6a1f1dSLionel Sambuc // 34*0a6a1f1dSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 35*0a6a1f1dSLionel Sambuc // RUN: -target arm64-linux-android \ 36*0a6a1f1dSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 37*0a6a1f1dSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 38*0a6a1f1dSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-ARM64 %s 39*0a6a1f1dSLionel Sambuc // CHECK-ARM64: {{.*}}clang{{.*}}" "-cc1" 40*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8" 41*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8/aarch64-linux-android" 42*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-internal-externc-isystem" "{{.*}}/sysroot/include" 43*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 44*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 45*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8" 46*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8/../../../../aarch64-linux-android/lib" 47*0a6a1f1dSLionel Sambuc // CHECK-ARM64: "-L{{.*}}/sysroot/usr/lib" 48*0a6a1f1dSLionel Sambuc // 49*0a6a1f1dSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 50f4a2713aSLionel Sambuc // RUN: -target mipsel-linux-android \ 51f4a2713aSLionel Sambuc // RUN: -mips32 \ 52f4a2713aSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 53f4a2713aSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 54f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-MIPS %s 55f4a2713aSLionel Sambuc // CHECK-MIPS: {{.*}}clang{{.*}}" "-cc1" 56f4a2713aSLionel Sambuc // CHECK-MIPS: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3" 57f4a2713aSLionel Sambuc // CHECK-MIPS: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3/mipsel-linux-android" 58f4a2713aSLionel Sambuc // CHECK-MIPS: "-internal-externc-isystem" "{{.*}}/sysroot/include" 59f4a2713aSLionel Sambuc // CHECK-MIPS: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 60f4a2713aSLionel Sambuc // CHECK-MIPS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 61f4a2713aSLionel Sambuc // CHECK-MIPS: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3" 62f4a2713aSLionel Sambuc // CHECK-MIPS: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/../../../../mipsel-linux-android/lib" 63f4a2713aSLionel Sambuc // CHECK-MIPS: "-L{{.*}}/sysroot/usr/lib" 64f4a2713aSLionel Sambuc // 65f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 66f4a2713aSLionel Sambuc // RUN: -target mipsel-linux-android \ 67f4a2713aSLionel Sambuc // RUN: -march=mips32 -mips32r2 \ 68f4a2713aSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 69f4a2713aSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 70f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-MIPSR2 %s 71f4a2713aSLionel Sambuc // CHECK-MIPSR2: {{.*}}clang{{.*}}" "-cc1" 72f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3" 73f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3/mipsel-linux-android" 74f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-internal-externc-isystem" "{{.*}}/sysroot/include" 75f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 76f4a2713aSLionel Sambuc // CHECK-MIPSR2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 77f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/mips-r2" 78f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/../../../../mipsel-linux-android/lib" 79f4a2713aSLionel Sambuc // CHECK-MIPSR2: "-L{{.*}}/sysroot/usr/lib" 80f4a2713aSLionel Sambuc // 81f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 82f4a2713aSLionel Sambuc // RUN: -target mipsel-linux-android \ 83f4a2713aSLionel Sambuc // RUN: -mips32 -march=mips32r2 \ 84f4a2713aSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 85f4a2713aSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 86f4a2713aSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-MIPSR2-A %s 87f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: {{.*}}clang{{.*}}" "-cc1" 88f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3" 89f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3/mipsel-linux-android" 90f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-internal-externc-isystem" "{{.*}}/sysroot/include" 91f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 92f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 93f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/mips-r2" 94f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/../../../../mipsel-linux-android/lib" 95f4a2713aSLionel Sambuc // CHECK-MIPSR2-A: "-L{{.*}}/sysroot/usr/lib" 96*0a6a1f1dSLionel Sambuc // 97*0a6a1f1dSLionel Sambuc // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 98*0a6a1f1dSLionel Sambuc // RUN: -target mipsel-linux-android \ 99*0a6a1f1dSLionel Sambuc // RUN: -mips32r6 \ 100*0a6a1f1dSLionel Sambuc // RUN: -B%S/Inputs/basic_android_tree \ 101*0a6a1f1dSLionel Sambuc // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ 102*0a6a1f1dSLionel Sambuc // RUN: | FileCheck --check-prefix=CHECK-MIPSR6 %s 103*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: {{.*}}clang{{.*}}" "-cc1" 104*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3" 105*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-internal-isystem" "{{.*}}/mipsel-linux-android/include/c++/4.4.3/mipsel-linux-android" 106*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-internal-externc-isystem" "{{.*}}/sysroot/include" 107*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include" 108*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 109*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/mips-r6" 110*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-L{{.*}}/lib/gcc/mipsel-linux-android/4.4.3/../../../../mipsel-linux-android/lib" 111*0a6a1f1dSLionel Sambuc // CHECK-MIPSR6: "-L{{.*}}/sysroot/usr/lib" 112