[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / freebsd.cpp
blob56c3d3cba1fe59dc09c112e1972c550275a16dfd
1 // RUN: %clangxx %s -### -o %t.o -target amd64-unknown-freebsd -stdlib=platform 2>&1 \
2 // RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s
3 // RUN: %clangxx %s -### -o %t.o -target amd64-unknown-freebsd10.0 -stdlib=platform 2>&1 \
4 // RUN: | FileCheck --check-prefix=CHECK-TEN %s
5 // RUN: %clangxx %s -### -o %t.o -target amd64-unknown-freebsd9.2 -stdlib=platform 2>&1 \
6 // RUN: | FileCheck --check-prefix=CHECK-NINE %s
7 // CHECK-DEFAULT: "-lc++" "-lm"
8 // CHECK-TEN: "-lc++" "-lm"
9 // CHECK-NINE: "-lstdc++" "-lm"
11 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd -stdlib=platform 2>&1 \
12 // RUN: | FileCheck --check-prefix=CHECK-PG-DEFAULT %s
13 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd14.0 -stdlib=platform 2>&1 \
14 // RUN: | FileCheck --check-prefix=CHECK-PG-FOURTEEN %s
15 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd10.0 -stdlib=platform 2>&1 \
16 // RUN: | FileCheck --check-prefix=CHECK-PG-TEN %s
17 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd9.2 -stdlib=platform 2>&1 \
18 // RUN: | FileCheck --check-prefix=CHECK-PG-NINE %s
19 // CHECK-PG-DEFAULT: "-lc++" "-lm"
20 // CHECK-PG-FOURTEEN: "-lc++" "-lm"
21 // CHECK-PG-TEN: "-lc++_p" "-lm_p"
22 // CHECK-PG-NINE: "-lstdc++_p" "-lm_p"
24 // Test include paths with a sysroot.
25 // RUN: %clangxx %s -### -fsyntax-only 2>&1 \
26 // RUN: --target=amd64-unknown-freebsd \
27 // RUN: --sysroot=%S/Inputs/basic_openbsd_libcxx_tree \
28 // RUN: -resource-dir=%S/Inputs/resource_dir \
29 // RUN: | FileCheck --check-prefix=CHECK-LIBCXX-SYSROOT %s
30 // CHECK-LIBCXX-SYSROOT: "-cc1"
31 // CHECK-LIBCXX-SYSROOT-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
32 // CHECK-LIBCXX-SYSROOT-SAME: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
34 // Test include paths when the sysroot path ends with `/`.
35 // RUN: %clangxx %s -### -fsyntax-only 2>&1 \
36 // RUN: --target=amd64-unknown-freebsd \
37 // RUN: --sysroot=%S/Inputs/basic_openbsd_libcxx_tree/ \
38 // RUN: -resource-dir=%S/Inputs/resource_dir \
39 // RUN: | FileCheck --check-prefix=CHECK-LIBCXX-SYSROOT-SLASH %s
40 // CHECK-LIBCXX-SYSROOT-SLASH: "-cc1"
41 // CHECK-LIBCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
42 // CHECK-LIBCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr/include/c++/v1"