Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / android-installed-libcxx.cpp
blob14856e26e273074cd840006253c88eb0080be5db
1 // Check that we only find libc++ in the installation directory when it contains
2 // an Android-specific include directory.
4 // RUN: mkdir -p %t1/bin
5 // RUN: mkdir -p %t1/include/c++/v1
6 // RUN: mkdir -p %t1/sysroot
7 // RUN: %clang -target aarch64-none-linux-android -ccc-install-dir %t1/bin \
8 // RUN: --sysroot=%t1/sysroot -stdlib=libc++ -fsyntax-only \
9 // RUN: %s -### 2>&1 | FileCheck %s
10 // CHECK-NOT: "-internal-isystem" "{{.*}}v1"
12 // RUN: mkdir -p %t2/bin
13 // RUN: mkdir -p %t2/include/c++/v1
14 // RUN: mkdir -p %t2/sysroot
15 // RUN: mkdir -p %t2/include/aarch64-none-linux-android/c++/v1
16 // RUN: mkdir -p %t2/include/aarch64-none-linux-android23/c++/v1
18 // RUN: %clang -target aarch64-none-linux-android -ccc-install-dir %/t2/bin \
19 // RUN: --sysroot=%t2/sysroot -stdlib=libc++ -fsyntax-only \
20 // RUN: %s -### 2>&1 | FileCheck --check-prefix=ANDROID-DIR -DDIR=%/t2/bin %s
22 // RUN: %clang -target aarch64-none-linux-android21 -ccc-install-dir %/t2/bin \
23 // RUN: --sysroot=%t2/sysroot -stdlib=libc++ -fsyntax-only \
24 // RUN: %s -### 2>&1 | FileCheck --check-prefix=ANDROID-DIR -DDIR=%/t2/bin %s
26 // ANDROID-DIR: "-internal-isystem" "[[DIR]][[SEP:/|\\\\]]..[[SEP]]include[[SEP]]aarch64-none-linux-android[[SEP]]c++[[SEP]]v1"
27 // ANDROID-DIR-SAME: "-internal-isystem" "[[DIR]][[SEP]]..[[SEP]]include[[SEP]]c++[[SEP]]v1"
29 // RUN: %clang -target aarch64-none-linux-android23 -ccc-install-dir %/t2/bin \
30 // RUN: --sysroot=%t2/sysroot -stdlib=libc++ -fsyntax-only \
31 // RUN: %s -### 2>&1 | FileCheck --check-prefix=ANDROID23-DIR -DDIR=%/t2/bin %s
33 // RUN: %clang -target aarch64-none-linux-android28 -ccc-install-dir %/t2/bin \
34 // RUN: --sysroot=%t2/sysroot -stdlib=libc++ -fsyntax-only \
35 // RUN: %s -### 2>&1 | FileCheck --check-prefix=ANDROID23-DIR -DDIR=%/t2/bin %s
37 // ANDROID23-DIR: "-internal-isystem" "[[DIR]][[SEP:/|\\\\]]..[[SEP]]include[[SEP]]aarch64-none-linux-android23[[SEP]]c++[[SEP]]v1"
38 // ANDROID23-DIR-SAME: "-internal-isystem" "[[DIR]][[SEP]]..[[SEP]]include[[SEP]]c++[[SEP]]v1"