1 // UNSUPPORTED: system-windows
2 /// A basic clang -cc1 command-line, and simple environment check.
4 // RUN: %clang %s -### --target=loongarch32 2>&1 | FileCheck --check-prefix=CC1 %s -DTRIPLE=loongarch32
5 // RUN: %clang %s -### --target=loongarch64 2>&1 | FileCheck --check-prefix=CC1 %s -DTRIPLE=loongarch64
7 // CC1: "-cc1" "-triple" "[[TRIPLE]]"
9 /// In the below tests, --rtlib=platform is used so that the driver ignores
10 /// the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib.
12 // RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie -mabi=lp64d \
13 // RUN: --target=loongarch64-unknown-linux-gnu --rtlib=platform --unwindlib=platform \
14 // RUN: --gcc-toolchain=%S/Inputs/multilib_loongarch_linux_sdk \
15 // RUN: --sysroot=%S/Inputs/multilib_loongarch_linux_sdk/sysroot 2>&1 \
16 // RUN: | FileCheck --check-prefix=LA64 %s
18 // LA64: "{{.*}}/Inputs/multilib_loongarch_linux_sdk/lib/gcc/loongarch64-unknown-linux-gnu/12.1.0/../../../../loongarch64-unknown-linux-gnu/bin/ld"
19 // LA64-SAME: {{^}} "--sysroot={{.*}}/Inputs/multilib_loongarch_linux_sdk/sysroot"
20 // LA64-SAME: "-m" "elf64loongarch"
21 // LA64-SAME: "-dynamic-linker" "/lib64/ld-linux-loongarch-lp64d.so.1"
22 // LA64-SAME: "{{.*}}/Inputs/multilib_loongarch_linux_sdk/lib/gcc/loongarch64-unknown-linux-gnu/12.1.0/crtbegin.o"
23 // LA64-SAME: "-L{{.*}}/Inputs/multilib_loongarch_linux_sdk/lib/gcc/loongarch64-unknown-linux-gnu/12.1.0"
24 // LA64-SAME: {{^}} "-L{{.*}}/Inputs/multilib_loongarch_linux_sdk/lib/gcc/loongarch64-unknown-linux-gnu/12.1.0/../../../../loongarch64-unknown-linux-gnu/lib/../lib64"
25 // LA64-SAME: {{^}} "-L{{.*}}/Inputs/multilib_loongarch_linux_sdk/sysroot/usr/lib/../lib64"
26 // LA64-SAME: {{^}} "-L{{.*}}/Inputs/multilib_loongarch_linux_sdk/lib/gcc/loongarch64-unknown-linux-gnu/12.1.0/../../../../loongarch64-unknown-linux-gnu/lib"
27 // LA64-SAME: {{^}} "-L{{.*}}/Inputs/multilib_loongarch_linux_sdk/sysroot/usr/lib"