Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / openbsd.cpp
blob906b0d22242d2e0d29d26b038ad994b68313e495
1 // Check libraries used when linking C++
2 // RUN: %clangxx %s -### -o %t.o -target amd64-pc-openbsd 2>&1 \
3 // RUN: | FileCheck --check-prefix=CHECK-CXX %s
4 // RUN: %clangxx %s -### -o %t.o -target i686-pc-openbsd 2>&1 \
5 // RUN: | FileCheck --check-prefix=CHECK-CXX %s
6 // RUN: %clangxx %s -### -o %t.o -target aarch64-unknown-openbsd 2>&1 \
7 // RUN: | FileCheck --check-prefix=CHECK-CXX %s
8 // RUN: %clangxx %s -### -o %t.o -target arm-unknown-openbsd 2>&1 \
9 // RUN: | FileCheck --check-prefix=CHECK-CXX %s
10 // CHECK-CXX: "-lc++" "-lc++abi" "-lpthread" "-lm"
12 // Check for profiling variants of libraries when linking C++
13 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-pc-openbsd 2>&1 \
14 // RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
15 // RUN: %clangxx %s -### -pg -o %t.o -target i686-pc-openbsd 2>&1 \
16 // RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
17 // RUN: %clangxx %s -### -pg -o %t.o -target aarch64-unknown-openbsd 2>&1 \
18 // RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
19 // RUN: %clangxx %s -### -pg -o %t.o -target arm-unknown-openbsd 2>&1 \
20 // RUN: | FileCheck --check-prefix=CHECK-PG-CXX %s
21 // CHECK-PG-CXX: "-lc++_p" "-lc++abi_p" "-lpthread_p" "-lm_p"
23 // Test include paths with a sysroot.
24 // RUN: %clangxx %s -### -fsyntax-only 2>&1 \
25 // RUN: --target=amd64-pc-openbsd \
26 // RUN: --sysroot=%S/Inputs/basic_openbsd_libcxx_tree \
27 // RUN: -resource-dir=%S/Inputs/resource_dir \
28 // RUN: | FileCheck --check-prefix=CHECK-LIBCXX-SYSROOT %s
29 // CHECK-LIBCXX-SYSROOT: "-cc1"
30 // CHECK-LIBCXX-SYSROOT-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
31 // CHECK-LIBCXX-SYSROOT-SAME: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
33 // Test include paths when the sysroot path ends with `/`.
34 // RUN: %clangxx %s -### -fsyntax-only 2>&1 \
35 // RUN: --target=amd64-pc-openbsd \
36 // RUN: --sysroot=%S/Inputs/basic_openbsd_libcxx_tree/ \
37 // RUN: -resource-dir=%S/Inputs/resource_dir \
38 // RUN: | FileCheck --check-prefix=CHECK-LIBCXX-SYSROOT-SLASH %s
39 // CHECK-LIBCXX-SYSROOT-SLASH: "-cc1"
40 // CHECK-LIBCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
41 // CHECK-LIBCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr/include/c++/v1"