xref: /llvm-project/clang/test/Driver/ohos.c (revision d156a5a1cb3b3405a6c1e941d112f262c29e15cf)
128997febSPavel Kosov // RUN: %clang %s -### -no-canonical-prefixes --target=arm-liteos \
228997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
3abae53f4SFangrui Song // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot -fuse-ld=ld -march=armv7-a 2>&1 \
428997febSPavel Kosov // RUN:     | FileCheck -check-prefixes=CHECK,CHECK-ARM %s
528997febSPavel Kosov // RUN: %clang %s -### -no-canonical-prefixes --target=arm-liteos \
628997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
7abae53f4SFangrui Song // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot -fuse-ld=ld -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=soft 2>&1 \
828997febSPavel Kosov // RUN:     | FileCheck -check-prefixes=CHECK,CHECK-ARM-A7-SOFT %s
928997febSPavel Kosov // CHECK: {{.*}}clang{{.*}}" "-cc1"
1028997febSPavel Kosov // CHECK-NOT: "-munwind-tables"
1128997febSPavel Kosov // CHECK: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
1228997febSPavel Kosov // CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
1328997febSPavel Kosov // CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
1428997febSPavel Kosov // CHECK-NOT: "-fsanitize=safe-stack"
1528997febSPavel Kosov // CHECK-NOT: "-stack-protector" "2"
1628997febSPavel Kosov // CHECK-NOT: "-fno-common"
1728997febSPavel Kosov // CHECK: {{.*}}ld.lld{{.*}}" "--sysroot=[[SYSROOT]]"
1828997febSPavel Kosov // CHECK-NOT: "--sysroot=[[SYSROOT]]"
1928997febSPavel Kosov // CHECK-NOT: "--build-id"
2028997febSPavel Kosov // CHECK: "--hash-style=both"
21ae623d16SFangrui Song // CHECK: "-pie"
2228997febSPavel Kosov // CHECK: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
2328997febSPavel Kosov // CHECK: Scrt1.o
2428997febSPavel Kosov // CHECK: crti.o
2528997febSPavel Kosov // CHECK: clang_rt.crtbegin.o
2628997febSPavel Kosov // CHECK-ARM: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}"
2728997febSPavel Kosov // CHECK-ARM-A7-SOFT: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_soft"
2828997febSPavel Kosov // CHECK-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.builtins.a"
2928997febSPavel Kosov // CHECK-ARM-A7-SOFT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos/a7_soft{{/|\\\\}}libclang_rt.builtins.a"
3028997febSPavel Kosov // CHECK: "-lc"
3128997febSPavel Kosov // CHECK: clang_rt.crtend.o
3228997febSPavel Kosov // CHECK: crtn.o
3328997febSPavel Kosov 
34f39c399dSFangrui Song // RUN: not %clang %s -### --target=arm-liteos -rtlib=libgcc 2>&1 \
3528997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-RTLIB
3628997febSPavel Kosov // CHECK-RTLIB: error: invalid runtime library name in argument '-rtlib=libgcc'
3728997febSPavel Kosov 
38abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-liteos -static -fuse-ld=ld 2>&1 \
3928997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-STATIC
4028997febSPavel Kosov // CHECK-STATIC: "-static"
4128997febSPavel Kosov // CHECK-STATIC-NOT: "-Bdynamic"
4228997febSPavel Kosov // CHECK-STATIC: "-l:libunwind.a"
4328997febSPavel Kosov // CHECK-STATIC: "-lc"
4428997febSPavel Kosov 
45abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-liteos -shared -fuse-ld=ld 2>&1 \
4628997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-SHARED
4728997febSPavel Kosov // CHECK-SHARED-NOT: "-pie"
4828997febSPavel Kosov // CHECK-SHARED: "-shared"
4928997febSPavel Kosov // CHECK-SHARED: "-lc"
5028997febSPavel Kosov // CHECK-SHARED: "-l:libunwind.a"
5128997febSPavel Kosov 
52abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-linux-ohos -fuse-ld=ld 2>&1 \
5328997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-RUNTIME
54abae53f4SFangrui Song // RUN: %clang %s -### --target=aarch64-linux-ohos -fuse-ld=ld 2>&1 \
5528997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-RUNTIME
56abae53f4SFangrui Song // RUN: %clang %s -### --target=mipsel-linux-ohos -fuse-ld=ld 2>&1 \
5728997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-RUNTIME
58abae53f4SFangrui Song // RUN: %clang %s -### --target=x86_64-linux-ohos -fuse-ld=ld 2>&1 \
5928997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-RUNTIME
6028997febSPavel Kosov // CHECK-RUNTIME: "{{.*}}libclang_rt.builtins.a"
6128997febSPavel Kosov // CHECK-RUNTIME: "-l:libunwind.a"
6228997febSPavel Kosov // CHECK-LIBM: "-lm"
6328997febSPavel Kosov 
64abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-liteos -r -fuse-ld=ld 2>&1 \
6528997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-RELOCATABLE
6628997febSPavel Kosov // CHECK-RELOCATABLE-NOT: "-pie"
6728997febSPavel Kosov // CHECK-RELOCATABLE: "-r"
6828997febSPavel Kosov 
69abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-liteos -nodefaultlibs -fuse-ld=ld 2>&1 \
7028997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
7128997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-NODEFAULTLIBS
7228997febSPavel Kosov // CHECK-NODEFAULTLIBS: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
7328997febSPavel Kosov // CHECK-NODEFAULTLIBS-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.builtins.a"
7428997febSPavel Kosov // CHECK-NODEFAULTLIBS-NOT: "-lc"
7528997febSPavel Kosov 
76abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-liteos -nostdlib -fuse-ld=ld 2>&1 \
7728997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
7828997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-NOSTDLIB
7928997febSPavel Kosov // CHECK-NOSTDLIB: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
8028997febSPavel Kosov // CHECK-NOSTDLIB-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.builtins.a"
8128997febSPavel Kosov // CHECK-NOSTDLIB-NOT: "-lc"
8228997febSPavel Kosov 
83abae53f4SFangrui Song // RUN: %clang %s -### --target=arm-liteos -nolibc -fuse-ld=ld 2>&1 \
8428997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
8528997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-NOLIBC
8628997febSPavel Kosov // CHECK-NOLIBC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
8728997febSPavel Kosov // CHECK-NOLIBC: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.builtins.a"
8828997febSPavel Kosov // CHECK-NOLIBC-NOT: "-lc"
8928997febSPavel Kosov 
9028997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
9128997febSPavel Kosov // RUN:     -fsanitize=safe-stack 2>&1 \
9228997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
93abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
9428997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-SAFESTACK
9528997febSPavel Kosov // CHECK-SAFESTACK: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
9628997febSPavel Kosov // CHECK-SAFESTACK: "-fsanitize=safe-stack"
9728997febSPavel Kosov // CHECK-SAFESTACK: "__safestack_init"
98*0248b597SRainer Orth // CHECK-SAFESTACK: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.safestack.a"
9928997febSPavel Kosov 
10028997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
10128997febSPavel Kosov // RUN:     -fsanitize=address 2>&1 \
10228997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
103abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
10428997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-ASAN-ARM
10528997febSPavel Kosov // CHECK-ASAN-ARM: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
10628997febSPavel Kosov // CHECK-ASAN-ARM: "-fsanitize=address"
10728997febSPavel Kosov // CHECK-ASAN-ARM: "-fsanitize-address-use-after-scope"
10828997febSPavel Kosov // CHECK-ASAN-ARM: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
10928997febSPavel Kosov // CHECK-ASAN-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.asan.a"
11028997febSPavel Kosov // CHECK-ASAN-ARM-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.asan-preinit.a"
11128997febSPavel Kosov 
11228997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
11328997febSPavel Kosov // RUN:     -fsanitize=address -fPIC -shared 2>&1 \
11428997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
11528997febSPavel Kosov // RUN:     -shared-libsan \
116abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
11728997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-ASAN-SHARED
11828997febSPavel Kosov // CHECK-ASAN-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
11928997febSPavel Kosov // CHECK-ASAN-SHARED: "-fsanitize=address"
12028997febSPavel Kosov // CHECK-ASAN-SHARED: "-fsanitize-address-use-after-scope"
12128997febSPavel Kosov // CHECK-ASAN-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.asan.so"
12228997febSPavel Kosov // CHECK-ASAN-SHARED-NOT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.asan-preinit.a"
12328997febSPavel Kosov 
12428997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
12528997febSPavel Kosov // RUN:     -fsanitize=fuzzer 2>&1 \
12628997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
127abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
12828997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-FUZZER-ARM
12928997febSPavel Kosov // CHECK-FUZZER-ARM: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
13028997febSPavel Kosov // CHECK-FUZZER-ARM: "-fsanitize=fuzzer,fuzzer-no-link"
13128997febSPavel Kosov // CHECK-FUZZER-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.fuzzer.a"
13228997febSPavel Kosov 
13328997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
13428997febSPavel Kosov // RUN:     -fsanitize=scudo 2>&1 \
13528997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
136abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
13728997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-SCUDO-ARM
13828997febSPavel Kosov // CHECK-SCUDO-ARM: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
13928997febSPavel Kosov // CHECK-SCUDO-ARM: "-fsanitize=scudo"
14028997febSPavel Kosov // CHECK-SCUDO-ARM: "-pie"
14128997febSPavel Kosov // CHECK-SCUDO-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.scudo_standalone.a"
14228997febSPavel Kosov 
14328997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
14428997febSPavel Kosov // RUN:     -fsanitize=scudo -fPIC -shared 2>&1 \
14528997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
14628997febSPavel Kosov // RUN:     -shared-libsan \
147abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
14828997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-SCUDO-SHARED
14928997febSPavel Kosov // CHECK-SCUDO-SHARED: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
15028997febSPavel Kosov // CHECK-SCUDO-SHARED: "-fsanitize=scudo"
15128997febSPavel Kosov // CHECK-SCUDO-SHARED: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.scudo_standalone.so"
15228997febSPavel Kosov 
15328997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
15428997febSPavel Kosov // RUN:     -fxray-instrument -fxray-modes=xray-basic \
15528997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
156abae53f4SFangrui Song // RUN:     -fuse-ld=ld 2>&1 \
15728997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-XRAY-ARM
15828997febSPavel Kosov // CHECK-XRAY-ARM: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
15928997febSPavel Kosov // CHECK-XRAY-ARM: "-fxray-instrument"
16028997febSPavel Kosov // CHECK-XRAY-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.xray.a"
16128997febSPavel Kosov // CHECK-XRAY-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.xray-basic.a"
16228997febSPavel Kosov 
16328997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
16428997febSPavel Kosov // RUN:     -O3 -flto -mcpu=cortex-a53 2>&1 \
165abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
16628997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-LTO
16728997febSPavel Kosov // CHECK-LTO: "-plugin-opt=mcpu=cortex-a53"
16828997febSPavel Kosov // CHECK-LTO: "-plugin-opt=O3"
16928997febSPavel Kosov 
17028997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
17128997febSPavel Kosov // RUN:     -flto=thin -flto-jobs=8 -mcpu=cortex-a7 2>&1 \
172abae53f4SFangrui Song // RUN:     -fuse-ld=ld \
17328997febSPavel Kosov // RUN:     | FileCheck %s -check-prefix=CHECK-THINLTO
17428997febSPavel Kosov // CHECK-THINLTO: "-plugin-opt=mcpu=cortex-a7"
17528997febSPavel Kosov // CHECK-THINLTO: "-plugin-opt=thinlto"
17628997febSPavel Kosov // CHECK-THINLTO: "-plugin-opt=jobs=8"
17728997febSPavel Kosov 
17828997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
17928997febSPavel Kosov // RUN:     -ccc-install-dir %S/Inputs/ohos_native_tree/llvm/bin \
18028997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
18128997febSPavel Kosov // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot \
18228997febSPavel Kosov // RUN:     -march=armv7-a -mfloat-abi=soft 2>&1\
18328997febSPavel Kosov // RUN:     | FileCheck %s -check-prefixes=CHECK-MULTILIB,CHECK-MULTILIB-SF,CHECK-MULTILIB-ARM
18428997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos \
18528997febSPavel Kosov // RUN:     -ccc-install-dir %S/Inputs/ohos_native_tree/llvm/bin \
18628997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
18728997febSPavel Kosov // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot \
18828997febSPavel Kosov // RUN:     -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=soft 2>&1\
18928997febSPavel Kosov // RUN:     | FileCheck %s -check-prefixes=CHECK-MULTILIB,CHECK-MULTILIB-SF,CHECK-MULTILIB-ARM-A7-SOFT
19028997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos  \
19128997febSPavel Kosov // RUN:     -ccc-install-dir %S/Inputs/ohos_native_tree/llvm/bin \
19228997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
19328997febSPavel Kosov // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot \
19428997febSPavel Kosov // RUN:     -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 2>&1\
19528997febSPavel Kosov // RUN:     | FileCheck %s -check-prefixes=CHECK-MULTILIB,CHECK-MULTILIB-SF,CHECK-MULTILIB-ARM-A7-SOFTFP
19628997febSPavel Kosov // RUN: %clang %s -### --target=arm-liteos  \
19728997febSPavel Kosov // RUN:     -ccc-install-dir %S/Inputs/ohos_native_tree/llvm/bin \
19828997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
19928997febSPavel Kosov // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot \
20028997febSPavel Kosov // RUN:     -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4 2>&1\
20128997febSPavel Kosov // RUN:     | FileCheck %s -check-prefixes=CHECK-MULTILIB,CHECK-MULTILIB-HF,CHECK-MULTILIB-ARM-A7-HARD
20228997febSPavel Kosov // CHECK-MULTILIB: {{.*}}clang{{.*}}" "-cc1"
20328997febSPavel Kosov // CHECK-MULTILIB: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
20428997febSPavel Kosov // CHECK-MULTILIB: "-isysroot" "[[SYSROOT:[^"]+]]"
20528997febSPavel Kosov // CHECK-MULTILIB: {{.*}}ld.lld{{.*}}" "--sysroot=[[SYSROOT]]"
20628997febSPavel Kosov // CHECK-MULTILIB-SF: "-dynamic-linker" "/lib/ld-musl-arm.so.1"
20728997febSPavel Kosov // CHECK-MULTILIB-HF: "-dynamic-linker" "/lib/ld-musl-armhf.so.1"
20828997febSPavel Kosov 
20928997febSPavel Kosov // CHECK-MULTILIB-ARM: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}"
21028997febSPavel Kosov 
21128997febSPavel Kosov // CHECK-MULTILIB-ARM-A7-SOFT: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_soft"
21228997febSPavel Kosov 
21328997febSPavel Kosov // CHECK-MULTILIB-ARM-A7-SOFTFP: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_softfp_neon-vfpv4"
21428997febSPavel Kosov 
21528997febSPavel Kosov // CHECK-MULTILIB-ARM-A7-HARD: "-L[[SYSROOT]]{{/|\\\\}}usr{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_hard_neon-vfpv4"
21628997febSPavel Kosov 
21728997febSPavel Kosov // CHECK-MULTILIB-ARM: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}libclang_rt.builtins.a"
21828997febSPavel Kosov // CHECK-MULTILIB-ARM-A7-SOFT: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_soft{{/|\\\\}}libclang_rt.builtins.a"
21928997febSPavel Kosov // CHECK-MULTILIB-ARM-A7-SOFTFP: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_softfp_neon-vfpv4{{/|\\\\}}libclang_rt.builtins.a"
22028997febSPavel Kosov // CHECK-MULTILIB-ARM-A7-HARD: "[[RESOURCE_DIR]]{{/|\\\\}}lib{{/|\\\\}}arm-liteos-ohos{{/|\\\\}}a7_hard_neon-vfpv4{{/|\\\\}}libclang_rt.builtins.a"
22128997febSPavel Kosov 
22228997febSPavel Kosov // RUN: %clang %s -### -no-canonical-prefixes --target=arm-linux-ohos -fprofile-instr-generate -v \
22328997febSPavel Kosov // RUN:     -resource-dir=%S/Inputs/ohos_native_tree/llvm/lib/clang/x.y.z \
224abae53f4SFangrui Song // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot -fuse-ld=ld -march=armv7-a 2>&1 \
22528997febSPavel Kosov // RUN:     | FileCheck -check-prefixes=CHECK-PROFILE-RTLIB %s
22628997febSPavel Kosov 
22728997febSPavel Kosov // CHECK-PROFILE-RTLIB: -u__llvm_profile_runtime
22828997febSPavel Kosov // CHECK-PROFILE-RTLIB: libclang_rt.profile
22928997febSPavel Kosov 
23028997febSPavel Kosov // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
23128997febSPavel Kosov // RUN:     --target=arm64-linux-ohos -pthread \
23228997febSPavel Kosov // RUN:     --sysroot=%S/Inputs/ohos_native_tree/sysroot \
23328997febSPavel Kosov // RUN:     -shared \
23428997febSPavel Kosov // RUN:   | FileCheck --check-prefix=CHECK-OHOS-PTHREAD %s
23528997febSPavel Kosov 
23628997febSPavel Kosov // CHECK-OHOS-PTHREAD-NOT: -lpthread
23728997febSPavel Kosov 
238