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