150
|
1 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
2 // RUN: -target armv6m-none-eabi \
|
|
3 // RUN: -T semihosted.lds \
|
|
4 // RUN: -L some/directory/user/asked/for \
|
|
5 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
6 // RUN: | FileCheck --check-prefix=CHECK-V6M-C %s
|
|
7 // CHECK-V6M-C: "[[PREFIX_DIR:.*]]{{[/\\]+}}{{[^/^\\]+}}{{[/\\]+}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-none-unknown-eabi"
|
|
8 // CHECK-V6M-C-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
|
|
9 // CHECK-V6M-C-SAME: "-isysroot" "[[SYSROOT:[^"]*]]"
|
|
10 // CHECK-V6M-C-SAME: "-internal-isystem" "[[SYSROOT]]{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
|
|
11 // CHECk-V6M-C-SAME: "-internal-isystem" "[[SYSROOT]]{{[/\\]+}}include"
|
|
12 // CHECK-V6M-C-SAME: "-x" "c++" "{{.*}}baremetal.cpp"
|
|
13 // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
|
|
14 // CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal"
|
|
15 // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for"
|
173
|
16 // CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
|
150
|
17 // CHECK-V6M-C-SAME: "-o" "{{.*}}.o"
|
|
18
|
|
19 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
20 // RUN: -target armv6m-none-eabi \
|
|
21 // RUN: -nostdlibinc -nobuiltininc \
|
|
22 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
23 // RUN: | FileCheck --check-prefix=CHECK-V6M-LIBINC %s
|
|
24 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
25 // RUN: -target armv6m-none-eabi \
|
|
26 // RUN: -nostdinc \
|
|
27 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
28 // RUN: | FileCheck --check-prefix=CHECK-V6M-LIBINC %s
|
|
29 // CHECK-V6M-LIBINC-NOT: "-internal-isystem"
|
|
30
|
|
31 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
32 // RUN: -target armv6m-none-eabi \
|
|
33 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
34 // RUN: | FileCheck --check-prefix=CHECK-V6M-DEFAULTCXX %s
|
|
35 // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
|
|
36 // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
|
|
37 // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
|
173
|
38 // CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
|
150
|
39 // CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o"
|
|
40
|
|
41 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
42 // RUN: -target armv6m-none-eabi \
|
|
43 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
44 // RUN: -stdlib=libc++ \
|
|
45 // RUN: | FileCheck --check-prefix=CHECK-V6M-LIBCXX %s
|
|
46 // CHECK-V6M-LIBCXX-NOT: "-internal-isystem" "{{[^"]+}}{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}{{[^v].*}}"
|
|
47 // CHECK-V6M-LIBCXX: "-internal-isystem" "{{[^"]+}}{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
|
|
48 // CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
|
|
49 // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
|
|
50 // CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
|
173
|
51 // CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
|
150
|
52 // CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o"
|
|
53
|
|
54 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
55 // RUN: -target armv6m-none-eabi \
|
|
56 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
57 // RUN: -stdlib=libstdc++ \
|
|
58 // RUN: | FileCheck --check-prefix=CHECK-V6M-LIBSTDCXX %s
|
|
59 // CHECK-V6M-LIBSTDCXX-NOT: "-internal-isystem" "{{[^"]+}}{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
|
|
60 // CHECK-V6M-LIBSTDCXX: "-internal-isystem" "{{[^"]+}}{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}6.0.0"
|
|
61 // CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
|
|
62 // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
|
|
63 // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind"
|
173
|
64 // CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
|
150
|
65 // CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o"
|
|
66
|
|
67 // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
68 // RUN: -target armv6m-none-eabi \
|
|
69 // RUN: --sysroot=%S/Inputs/baremetal_arm \
|
|
70 // RUN: -nodefaultlibs \
|
|
71 // RUN: | FileCheck --check-prefix=CHECK-V6M-NDL %s
|
|
72 // CHECK-V6M-NDL: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
|
|
73 // CHECK-V6M-NDL-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal" "-o" "{{.*}}.o"
|
|
74
|
|
75 // RUN: %clangxx -target arm-none-eabi -v 2>&1 \
|
|
76 // RUN: | FileCheck %s --check-prefix=CHECK-THREAD-MODEL
|
|
77 // CHECK-THREAD-MODEL: Thread model: posix
|
|
78
|
|
79 // RUN: %clangxx -target arm-none-eabi -mthread-model single -v 2>&1 \
|
|
80 // RUN: | FileCheck %s --check-prefix=CHECK-THREAD-MODEL-SINGLE
|
|
81 // CHECK-THREAD-MODEL-SINGLE: Thread model: single
|
|
82
|
|
83 // RUN: %clangxx -target arm-none-eabi -mthread-model posix -v 2>&1 \
|
|
84 // RUN: | FileCheck %s --check-prefix=CHECK-THREAD-MODEL-POSIX
|
|
85 // CHECK-THREAD-MODEL-POSIX: Thread model: posix
|