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 // CHECK-DEFAULT: "-lc++" "-lm"
6 // CHECK-TEN: "-lc++" "-lm"
8 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd -stdlib=platform 2>&1 \
9 // RUN: | FileCheck --check-prefix=CHECK-PG-DEFAULT %s
10 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd14.0 -stdlib=platform 2>&1 \
11 // RUN: | FileCheck --check-prefix=CHECK-PG-FOURTEEN %s
12 // RUN: %clangxx %s -### -pg -o %t.o -target amd64-unknown-freebsd10.0 -stdlib=platform 2>&1 \
13 // RUN: | FileCheck --check-prefix=CHECK-PG-TEN %s
14 // CHECK-PG-DEFAULT: "-lc++" "-lm"
15 // CHECK-PG-FOURTEEN: "-lc++" "-lm"
16 // CHECK-PG-TEN: "-lc++_p" "-lm_p"
18 // Test include paths with a sysroot.
19 // RUN: %clangxx %s -### -fsyntax-only 2>&1 \
20 // RUN: --target=amd64-unknown-freebsd \
21 // RUN: --sysroot=%S/Inputs/basic_openbsd_libcxx_tree \
22 // RUN: -resource-dir=%S/Inputs/resource_dir \
23 // RUN: | FileCheck --check-prefix=CHECK-LIBCXX-SYSROOT %s
24 // CHECK-LIBCXX-SYSROOT: "-cc1"
25 // CHECK-LIBCXX-SYSROOT-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
26 // CHECK-LIBCXX-SYSROOT-SAME: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
28 // Test include paths when the sysroot path ends with `/`.
29 // RUN: %clangxx %s -### -fsyntax-only 2>&1 \
30 // RUN: --target=amd64-unknown-freebsd \
31 // RUN: --sysroot=%S/Inputs/basic_openbsd_libcxx_tree/ \
32 // RUN: -resource-dir=%S/Inputs/resource_dir \
33 // RUN: | FileCheck --check-prefix=CHECK-LIBCXX-SYSROOT-SLASH %s
34 // CHECK-LIBCXX-SYSROOT-SLASH: "-cc1"
35 // CHECK-LIBCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
36 // CHECK-LIBCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr/include/c++/v1"