Index: clang/test/Driver/csky-toolchain.c =================================================================== --- clang/test/Driver/csky-toolchain.c +++ clang/test/Driver/csky-toolchain.c @@ -7,7 +7,7 @@ // In the below tests, --rtlib=platform is used so that the driver ignores // the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib -// RUN: %clang -### %s -fuse-ld=ld -no-pie --target=csky-unknown-linux-gnu --rtlib=platform \ +// RUN: %clang -### %s -fuse-ld=ld -no-pie --target=csky-unknown-linux-gnu --rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain=%S/Inputs/multilib_csky_linux_sdk 2>&1 | FileCheck -check-prefix=C-CSKY-LINUX-MULTI %s // C-CSKY-LINUX-MULTI: "{{.*}}/Inputs/multilib_csky_linux_sdk/lib/gcc/csky-linux-gnuabiv2/6.3.0/../../..{{/|\\\\}}..{{/|\\\\}}csky-linux-gnuabiv2/bin{{/|\\\\}}ld" @@ -23,7 +23,7 @@ // C-CSKY-LINUX-MULTI: "-L{{.*}}/Inputs/multilib_csky_linux_sdk/lib/gcc/csky-linux-gnuabiv2/6.3.0/../../..{{/|\\\\}}..{{/|\\\\}}csky-linux-gnuabiv2/libc/lib" // C-CSKY-LINUX-MULTI: "-L{{.*}}/Inputs/multilib_csky_linux_sdk/lib/gcc/csky-linux-gnuabiv2/6.3.0/../../..{{/|\\\\}}..{{/|\\\\}}csky-linux-gnuabiv2/libc/usr/lib" -// RUN: %clang -### %s -fuse-ld=ld -fno-pic -no-pie --target=csky-unknown-linux-gnu --rtlib=platform -march=ck860v \ +// RUN: %clang -### %s -fuse-ld=ld -fno-pic -no-pie --target=csky-unknown-linux-gnu --rtlib=platform --unwindlib=platform -march=ck860v \ // RUN: --gcc-toolchain=%S/Inputs/multilib_csky_linux_sdk 2>&1 | FileCheck -check-prefix=C-CSKY-LINUX-CK860V %s // C-CSKY-LINUX-CK860V: "{{.*}}/Inputs/multilib_csky_linux_sdk/lib/gcc/csky-linux-gnuabiv2/6.3.0/../../..{{/|\\\\}}..{{/|\\\\}}csky-linux-gnuabiv2/bin{{/|\\\\}}ld" Index: clang/test/Driver/env.c =================================================================== --- clang/test/Driver/env.c +++ clang/test/Driver/env.c @@ -7,13 +7,13 @@ // RUN: env -i LC_ALL=C LD_LIBRARY_PATH="$LD_LIBRARY_PATH" CLANG_NO_DEFAULT_CONFIG=1 \ // RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ -// RUN: --rtlib=platform -no-pie \ +// RUN: --rtlib=platform --unwindlib=platform -no-pie \ // RUN: --gcc-toolchain="" 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s // // RUN: env -i LC_ALL=C PATH="" LD_LIBRARY_PATH="$LD_LIBRARY_PATH" CLANG_NO_DEFAULT_CONFIG=1 \ // RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ -// RUN: --rtlib=platform -no-pie \ +// RUN: --rtlib=platform --unwindlib=platform -no-pie \ // RUN: --gcc-toolchain="" 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s // // CHECK-LD-32-NOT: warning: Index: clang/test/Driver/gcc-install-dir.cpp =================================================================== --- clang/test/Driver/gcc-install-dir.cpp +++ clang/test/Driver/gcc-install-dir.cpp @@ -2,7 +2,7 @@ /// Test native GCC installation on Arch Linux i686. // RUN: %clang -### %s --target=i686-linux-gnu --sysroot=%S/Inputs/archlinux_i686_tree -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \ -// RUN: --stdlib=platform --rtlib=platform \ +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform \ // RUN: --gcc-install-dir=%S/Inputs/archlinux_i686_tree/usr/lib/gcc/i686-pc-linux-gnu/11.1.0 2>&1 | FileCheck %s --check-prefix=ARCH_I686 // ARCH_I686: "-internal-isystem" // ARCH_I686-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/i686-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0" @@ -14,7 +14,7 @@ /// Test native GCC installation on Debian amd64. --gcc-install-dir= may end with /. // RUN: %clangxx %s -### --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/debian_multiarch_tree \ -// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir --stdlib=platform --rtlib=platform \ +// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir --stdlib=platform --rtlib=platform --unwindlib=platform \ // RUN: --gcc-install-dir=%S/Inputs/debian_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/10/ 2>&1 | FileCheck %s --check-prefix=DEBIAN_X86_64 // DEBIAN_X86_64: "-internal-isystem" // DEBIAN_X86_64-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10" @@ -28,7 +28,7 @@ /// Test -m32. // RUN: %clangxx %s -### --target=x86_64-unknown-linux-gnu -m32 --sysroot=%S/Inputs/debian_multiarch_tree \ -// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir --stdlib=platform --rtlib=platform \ +// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir --stdlib=platform --rtlib=platform --unwindlib=platform \ // RUN: --gcc-install-dir=%S/Inputs/debian_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/10/ 2>&1 | FileCheck %s --check-prefix=DEBIAN_X86_64_M32 // DEBIAN_X86_64_M32: "-internal-isystem" // DEBIAN_X86_64_M32-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10" Index: clang/test/Driver/gcc-toolchain.cpp =================================================================== --- clang/test/Driver/gcc-toolchain.cpp +++ clang/test/Driver/gcc-toolchain.cpp @@ -3,12 +3,12 @@ /// Without --rtlib=libgcc the driver may pick clang_rt.crtbegin.o if /// -DCLANG_DEFAULT_RTLIB=compiler-rt. // RUN: %clangxx %s -### --target=x86_64-linux-gnu --sysroot= \ -// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc -no-pie 2>&1 | \ +// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc --unwindlib=libgcc -no-pie 2>&1 | \ // RUN: FileCheck %s // // Additionally check that the legacy spelling of the flag works. // RUN: %clangxx %s -### --target=x86_64-linux-gnu --sysroot= \ -// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc -no-pie 2>&1 | \ +// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc --unwindlib=libgcc -no-pie 2>&1 | \ // RUN: FileCheck %s // // Test for header search toolchain detection. Index: clang/test/Driver/linux-cross.cpp =================================================================== --- clang/test/Driver/linux-cross.cpp +++ clang/test/Driver/linux-cross.cpp @@ -3,7 +3,7 @@ /// Test native GCC installation on Arch Linux i686. // RUN: %clang -### %s --target=i686-linux-gnu --sysroot=%S/Inputs/archlinux_i686_tree \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=ARCH_I686 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=ARCH_I686 // ARCH_I686: "-resource-dir" "[[RESOURCE:[^"]+]]" // ARCH_I686: "-internal-isystem" // ARCH_I686-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/i686-pc-linux-gnu/11.1.0/../../../../include/c++/11.1.0" @@ -25,7 +25,7 @@ /// Test native x86-64 in the tree. // RUN: %clang -### %s --target=x86_64-linux-gnu --sysroot=%S/Inputs/debian_multiarch_tree \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_X86_64 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_X86_64 // DEBIAN_X86_64: "-resource-dir" "[[RESOURCE:[^"]+]]" // DEBIAN_X86_64: "-internal-isystem" // DEBIAN_X86_64-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10" @@ -54,7 +54,7 @@ /// Test -m32. // RUN: %clang -### %s --target=x86_64-linux-gnu -m32 --sysroot=%S/Inputs/debian_multiarch_tree \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_X86_64_M32 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_X86_64_M32 // DEBIAN_X86_64_M32: "-resource-dir" "[[RESOURCE:[^"]+]]" // DEBIAN_X86_64_M32: "-internal-isystem" // DEBIAN_X86_64_M32-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10" @@ -78,7 +78,7 @@ /// Test native GCC installation on Debian i386. // RUN: %clang -### %s --target=i686-linux-gnu --sysroot=%S/Inputs/debian_i386_tree \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_I686 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_I686 // DEBIAN_I686: "-resource-dir" "[[RESOURCE:[^"]+]]" // DEBIAN_I686: "-internal-isystem" // DEBIAN_I686-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/i686-linux-gnu/10/../../../../include/c++/10" @@ -103,7 +103,7 @@ /// Test -m64 on Debian i386. // RUN: %clang -### %s --target=i686-linux-gnu --sysroot=%S/Inputs/debian_i386_tree -m64 \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_I686_M64 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_I686_M64 // DEBIAN_I686_M64: "-resource-dir" "[[RESOURCE:[^"]+]]" // DEBIAN_I686_M64: "-internal-isystem" // DEBIAN_I686_M64-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc/i686-linux-gnu/10/../../../../include/c++/10" @@ -129,7 +129,7 @@ /// Test a cross compiler. // RUN: %clang -### %s --target=aarch64-linux-gnu --sysroot=%S/Inputs/debian_multiarch_tree \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_AARCH64 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=DEBIAN_AARCH64 // DEBIAN_AARCH64: "-resource-dir" "[[RESOURCE:[^"]+]]" // DEBIAN_AARCH64: "-internal-isystem" // DEBIAN_AARCH64-SAME: {{^}} "[[SYSROOT:[^"]+]]/usr/lib/gcc-cross/aarch64-linux-gnu/10/../../../../aarch64-linux-gnu/include/c++/10" @@ -202,13 +202,13 @@ /// LDSO_ARCH is i386 for all x86-32 variants. // RUN: %clang -### %s --target=i686-linux-musl --sysroot= \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=MUSL_I686 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=MUSL_I686 // MUSL_I686: "-dynamic-linker" "/lib/ld-musl-i386.so.1" // RUN: %clang -### %s --target=x86_64-linux-muslx32 --sysroot= \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=MUSL_X32 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=MUSL_X32 // RUN: %clang -### %s --target=i686-linux-musl -mx32 --sysroot= \ -// RUN: --stdlib=platform --rtlib=platform 2>&1 | FileCheck %s --check-prefix=MUSL_X32 +// RUN: --stdlib=platform --rtlib=platform --unwindlib=platform 2>&1 | FileCheck %s --check-prefix=MUSL_X32 // MUSL_X32: "-dynamic-linker" "/lib/ld-musl-x32.so.1" /// -r suppresses -dynamic-linker, default -l, and crt*.o like -nostdlib. Index: clang/test/Driver/linux-ld.c =================================================================== --- clang/test/Driver/linux-ld.c +++ clang/test/Driver/linux-ld.c @@ -3,7 +3,7 @@ // sysroot to make these tests independent of the host system. // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=i386-unknown-linux -rtlib=platform \ +// RUN: --target=i386-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s @@ -335,7 +335,7 @@ // RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=i386-unknown-linux -rtlib=platform -m32 \ +// RUN: --target=i386-unknown-linux -rtlib=platform --unwindlib=platform -m32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-32-TO-32 %s @@ -351,7 +351,7 @@ // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=i386-unknown-linux -rtlib=platform -m64 \ +// RUN: --target=i386-unknown-linux -rtlib=platform --unwindlib=platform -m64 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-32-TO-64 %s @@ -367,7 +367,7 @@ // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux -rtlib=platform -m64 \ +// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform -m64 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-64-TO-64 %s @@ -383,7 +383,7 @@ // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib" // // RUN: not %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux -rtlib=plaform -m32 \ +// RUN: --target=x86_64-unknown-linux -rtlib=plaform --unwindlib=platform -m32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-64-TO-32 %s @@ -399,7 +399,7 @@ // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform \ +// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-X32 %s @@ -415,7 +415,7 @@ // CHECK-X32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux -rtlib=platform -mx32 \ +// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform -mx32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-64-TO-X32 %s @@ -431,7 +431,7 @@ // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=i386-unknown-linux -rtlib=platform -mx32 \ +// RUN: --target=i386-unknown-linux -rtlib=platform --unwindlib=platform -mx32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-32-TO-X32 %s @@ -447,7 +447,7 @@ // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform -m64 \ +// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform --unwindlib=platform -m64 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-X32-TO-64 %s @@ -463,7 +463,7 @@ // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform -m32 \ +// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform --unwindlib=platform -m32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-X32-TO-32 %s @@ -479,7 +479,7 @@ // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux -rtlib=platform -m32 \ +// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform -m32 \ // RUN: --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \ // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-64-TO-32-SYSROOT %s @@ -494,7 +494,7 @@ // Check that we support unusual patch version formats, including missing that // component. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=i386-unknown-linux -rtlib=platform -m32 \ +// RUN: --target=i386-unknown-linux -rtlib=platform --unwindlib=platform -m32 \ // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -549,7 +549,7 @@ // // Check multi arch support on Ubuntu 12.04 LTS. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=arm-unknown-linux-gnueabihf -rtlib=platform \ +// RUN: --target=arm-unknown-linux-gnueabihf -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \ // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM-HF %s @@ -565,7 +565,7 @@ // // Check Ubuntu 13.10 on x86-64 targeting arm-linux-gnueabihf. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=arm-linux-gnueabihf -rtlib=platform \ +// RUN: --target=arm-linux-gnueabihf -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/x86-64_ubuntu_13.10 \ // RUN: | FileCheck --check-prefix=CHECK-X86-64-UBUNTU-13-10-ARM-HF %s @@ -584,7 +584,7 @@ // // Check Ubuntu 13.10 on x86-64 targeting arm-linux-gnueabi. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=arm-linux-gnueabi -rtlib=platform \ +// RUN: --target=arm-linux-gnueabi -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/x86-64_ubuntu_13.10 \ // RUN: | FileCheck --check-prefix=CHECK-X86-64-UBUNTU-13-10-ARM %s @@ -603,7 +603,7 @@ // // Check Ubuntu 14.04 on powerpc64le. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=powerpc64le-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=powerpc64le-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \ // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-PPC64LE %s @@ -620,7 +620,7 @@ // Check Ubuntu 14.04 on x32. // "/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32/crtn.o" // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform \ +// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \ // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-X32 %s @@ -637,7 +637,7 @@ // // Check fedora 18 on arm. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=armv7-unknown-linux-gnueabihf -rtlib=platform \ +// RUN: --target=armv7-unknown-linux-gnueabihf -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/fedora_18_tree \ // RUN: | FileCheck --check-prefix=CHECK-FEDORA-18-ARM-HF %s @@ -652,12 +652,12 @@ // // Check Fedora 21 on AArch64. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=arm64-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=arm64-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/fedora_21_tree \ // RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=aarch64-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=aarch64-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/fedora_21_tree \ // RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s @@ -672,7 +672,7 @@ // // Check Fedora 31 on riscv64. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=riscv64-redhat-linux -rtlib=platform \ +// RUN: --target=riscv64-redhat-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/fedora_31_riscv64_tree \ // RUN: | FileCheck --check-prefix=CHECK-FEDORA-31-RISCV64 %s @@ -686,7 +686,7 @@ // CHECK-FEDORA-31-RISCV64: "{{.*}}/usr/lib/gcc/riscv64-redhat-linux/9{{/|\\\\}}crtn.o" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=arm-unknown-linux-gnueabi -rtlib=platform \ +// RUN: --target=arm-unknown-linux-gnueabi -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \ // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM %s @@ -702,7 +702,7 @@ // // Test the setup that shipped in SUSE 10.3 on ppc64. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=powerpc64-suse-linux -rtlib=platform \ +// RUN: --target=powerpc64-suse-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \ // RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s @@ -715,12 +715,12 @@ // // Check openSuse Leap 42.2 on AArch64 // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=arm64-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=arm64-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=aarch64-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=aarch64-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s @@ -735,12 +735,12 @@ // // Check openSUSE Tumbleweed on armv6hl // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=armv6hl-suse-linux-gnueabi -rtlib=platform \ +// RUN: --target=armv6hl-suse-linux-gnueabi -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv6hl_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV6HL %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=armv6hl-suse-linux-gnueabi -rtlib=platform \ +// RUN: --target=armv6hl-suse-linux-gnueabi -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv6hl_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV6HL %s @@ -755,12 +755,12 @@ // // Check openSUSE Tumbleweed on armv7hl // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=armv7hl-suse-linux-gnueabi -rtlib=platform \ +// RUN: --target=armv7hl-suse-linux-gnueabi -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv7hl_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV7HL %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=armv7hl-suse-linux-gnueabi -rtlib=platform \ +// RUN: --target=armv7hl-suse-linux-gnueabi -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv7hl_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV7HL %s @@ -775,12 +775,12 @@ // // Check openSUSE Tumbleweed on riscv64 // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=riscv64-suse-linux -rtlib=platform \ +// RUN: --target=riscv64-suse-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_riscv64_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-RISCV64 %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=riscv64-suse-linux -rtlib=platform \ +// RUN: --target=riscv64-suse-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_riscv64_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-RISCV64 %s @@ -795,7 +795,7 @@ // // Check openSUSE Tumbleweed on ppc // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=powerpc-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=powerpc-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_ppc_tree \ // RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-PPC %s @@ -1353,14 +1353,14 @@ // // Check linker invocation on a Debian LoongArch sysroot. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=loongarch64-linux-gnu -rtlib=platform \ +// RUN: --target=loongarch64-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_loong64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-LOONG64 %s // // Check that "-gnuf64" is seen as "-gnu" for loong64. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=loongarch64-linux-gnuf64 -rtlib=platform \ +// RUN: --target=loongarch64-linux-gnuf64 -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_loong64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-LOONG64 %s @@ -1376,7 +1376,7 @@ // // Check linker invocation on Debian 6 MIPS 32/64-bit. // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mipsel-linux-gnu -rtlib=platform \ +// RUN: --target=mipsel-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPSEL %s @@ -1392,7 +1392,7 @@ // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64el-linux-gnu -rtlib=platform \ +// RUN: --target=mips64el-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL %s @@ -1408,7 +1408,7 @@ // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64el-linux-gnu -rtlib=platform -mabi=n32 \ +// RUN: --target=mips64el-linux-gnu -rtlib=platform --unwindlib=platform -mabi=n32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-N32 %s @@ -1424,7 +1424,7 @@ // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64el-linux-gnuabi64 -rtlib=platform -mabi=32 \ +// RUN: --target=mips64el-linux-gnuabi64 -rtlib=platform --unwindlib=platform -mabi=32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-O32 %s @@ -1440,12 +1440,12 @@ // CHECK-DEBIAN-ML-MIPS64EL-O32: "-L[[SYSROOT]]/usr/lib" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64-unknown-linux-gnu --rtlib=platform \ +// RUN: --target=mips64-unknown-linux-gnu --rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64-GNUABI %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64-linux-gnuabi64 -rtlib=platform -mabi=n64 \ +// RUN: --target=mips64-linux-gnuabi64 -rtlib=platform --unwindlib=platform -mabi=n64 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64-GNUABI %s @@ -1462,12 +1462,12 @@ // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/mips64-linux-gnuabi64{{/|\\\\}}crtn.o" // // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64el-unknown-linux-gnu -rtlib=platform \ +// RUN: --target=mips64el-unknown-linux-gnu -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-GNUABI %s // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=mips64el-linux-gnuabi64 -rtlib=platform -mabi=n64 \ +// RUN: --target=mips64el-linux-gnuabi64 -rtlib=platform --unwindlib=platform -mabi=n64 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-GNUABI %s @@ -1485,7 +1485,7 @@ // // Test linker invocation for Freescale SDK (OpenEmbedded). // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=powerpc-fsl-linux -rtlib=platform \ +// RUN: --target=powerpc-fsl-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/freescale_ppc_tree \ // RUN: | FileCheck --check-prefix=CHECK-FSL-PPC %s @@ -1495,7 +1495,7 @@ // CHECK-FSL-PPC: "{{.*}}{{/|\\\\}}crtbegin.o" // CHECK-FSL-PPC: "-L[[SYSROOT]]/usr/lib" // RUN: %clang -### %s -no-pie 2>&1 \ -// RUN: --target=powerpc64-fsl-linux -rtlib=platform \ +// RUN: --target=powerpc64-fsl-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/freescale_ppc64_tree \ // RUN: | FileCheck --check-prefix=CHECK-FSL-PPC64 %s Index: clang/test/Driver/loongarch-toolchain.c =================================================================== --- clang/test/Driver/loongarch-toolchain.c +++ clang/test/Driver/loongarch-toolchain.c @@ -10,7 +10,7 @@ /// the configure-time CLANG_DEFAULT_RTLIB option when choosing the runtime lib. // RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie -mabi=lp64d \ -// RUN: --target=loongarch64-unknown-linux-gnu --rtlib=platform \ +// RUN: --target=loongarch64-unknown-linux-gnu --rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain=%S/Inputs/multilib_loongarch_linux_sdk \ // RUN: --sysroot=%S/Inputs/multilib_loongarch_linux_sdk/sysroot 2>&1 \ // RUN: | FileCheck --check-prefix=LA64 %s Index: clang/test/Driver/miamcu-opt.c =================================================================== --- clang/test/Driver/miamcu-opt.c +++ clang/test/Driver/miamcu-opt.c @@ -1,10 +1,10 @@ -// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform -m32 %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform --target=x86_64-unknown-linux-gnu %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64 -mno-iamcu -miamcu -rtlib=platform %s 2>&1 | FileCheck %s -// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform -m64 %s 2>&1 | FileCheck %s -check-prefix=M64 -// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform -dynamic %s 2>&1 | FileCheck %s -check-prefix=DYNAMIC -// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform --target=armv8-eabi %s 2>&1 | FileCheck %s -check-prefix=NOT-X86 +// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform --unwindlib=platform %s 2>&1 | FileCheck %s +// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform --unwindlib=platform -m32 %s 2>&1 | FileCheck %s +// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform --unwindlib=platform --target=x86_64-unknown-linux-gnu %s 2>&1 | FileCheck %s +// RUN: %clang -### --target=x86_64 -mno-iamcu -miamcu -rtlib=platform --unwindlib=platform %s 2>&1 | FileCheck %s +// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform --unwindlib=platform -m64 %s 2>&1 | FileCheck %s -check-prefix=M64 +// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform --unwindlib=platform -dynamic %s 2>&1 | FileCheck %s -check-prefix=DYNAMIC +// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform --unwindlib=platform --target=armv8-eabi %s 2>&1 | FileCheck %s -check-prefix=NOT-X86 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -miamcu -mno-iamcu %s 2>&1 | FileCheck %s -check-prefix=MNOIAMCU // M64: error: invalid argument '-miamcu' not allowed with '-m64' Index: clang/test/Driver/nolibc.c =================================================================== --- clang/test/Driver/nolibc.c +++ clang/test/Driver/nolibc.c @@ -1,4 +1,4 @@ -// RUN: %clang -target i686-pc-linux-gnu -### -rtlib=libgcc -nolibc %s 2>&1 | FileCheck %s +// RUN: %clang -target i686-pc-linux-gnu -### -rtlib=libgcc --unwindlib=libgcc -nolibc %s 2>&1 | FileCheck %s // CHECK: crtbegin // CHECK: "-lgcc" // CHECK-NOT: "-lc" Index: clang/test/Driver/pic.c =================================================================== --- clang/test/Driver/pic.c +++ clang/test/Driver/pic.c @@ -132,11 +132,11 @@ // RUN: --sysroot=%S/Inputs/basic_freebsd_tree 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD // RUN: %clang %s -target i386-linux-gnu -fPIE -pie -### \ -// RUN: --gcc-toolchain="" -rtlib=platform \ +// RUN: --gcc-toolchain="" -rtlib=platform --unwindlib=platform \ // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD // RUN: %clang %s -target i386-linux-gnu -fPIC -pie -### \ -// RUN: --gcc-toolchain="" -rtlib=platform \ +// RUN: --gcc-toolchain="" -rtlib=platform --unwindlib=platform \ // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD // Index: clang/test/Driver/riscv32-toolchain.c =================================================================== --- clang/test/Driver/riscv32-toolchain.c +++ clang/test/Driver/riscv32-toolchain.c @@ -77,7 +77,7 @@ // CXX-RV32-BAREMETAL-NOSYSROOT-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-linux-gnu/8.0.1{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie \ -// RUN: --target=riscv32-unknown-linux-gnu --rtlib=platform -mabi=ilp32 \ +// RUN: --target=riscv32-unknown-linux-gnu --rtlib=platform --unwindlib=platform -mabi=ilp32 \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ // RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32-LINUX-MULTI-ILP32 %s @@ -92,7 +92,7 @@ // C-RV32-LINUX-MULTI-ILP32: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie \ -// RUN: --target=riscv32-unknown-linux-gnu --rtlib=platform -march=rv32imafd \ +// RUN: --target=riscv32-unknown-linux-gnu --rtlib=platform --unwindlib=platform -march=rv32imafd \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ // RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32-LINUX-MULTI-ILP32D %s @@ -107,7 +107,7 @@ // C-RV32-LINUX-MULTI-ILP32D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib32/ilp32d" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv32-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32I-BAREMETAL-MULTI-ILP32 %s @@ -121,7 +121,7 @@ // C-RV32I-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32imac/ilp32{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv32-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: -march=rv32im -mabi=ilp32\ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32IM-BAREMETAL-MULTI-ILP32 %s @@ -136,7 +136,7 @@ // C-RV32IM-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32im/ilp32{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv32-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: -march=rv32iac -mabi=ilp32\ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32IAC-BAREMETAL-MULTI-ILP32 %s @@ -151,7 +151,7 @@ // C-RV32IAC-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32iac/ilp32{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv32-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: -march=rv32imac -mabi=ilp32\ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32IMAC-BAREMETAL-MULTI-ILP32 %s @@ -166,7 +166,7 @@ // C-RV32IMAC-BAREMETAL-MULTI-ILP32: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv32imac/ilp32{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv32-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv32-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: -march=rv32imafc -mabi=ilp32f \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32IMAFC-BAREMETAL-MULTI-ILP32F %s @@ -183,7 +183,7 @@ // Check that --rtlib can be used to override the used runtime library // RUN: %clang -### %s \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \ -// RUN: --target=riscv32-unknown-elf --rtlib=libgcc 2>&1 \ +// RUN: --target=riscv32-unknown-elf --rtlib=libgcc --unwindlib=libgcc 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32-RTLIB-LIBGCC-ILP32 %s // C-RV32-RTLIB-LIBGCC-ILP32: "{{.*}}crt0.o" // C-RV32-RTLIB-LIBGCC-ILP32: "{{.*}}crtbegin.o" @@ -192,7 +192,7 @@ // RUN: %clang -### %s \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \ -// RUN: --target=riscv32-unknown-elf --rtlib=compiler-rt 2>&1 \ +// RUN: --target=riscv32-unknown-elf --rtlib=compiler-rt --unwindlib=compiler-rt 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32-RTLIB-COMPILERRT-ILP32 %s // C-RV32-RTLIB-COMPILERRT-ILP32: "{{.*}}crt0.o" // C-RV32-RTLIB-COMPILERRT-ILP32: "{{.*}}clang_rt.crtbegin-riscv32.o" Index: clang/test/Driver/riscv64-toolchain.c =================================================================== --- clang/test/Driver/riscv64-toolchain.c +++ clang/test/Driver/riscv64-toolchain.c @@ -77,7 +77,7 @@ // CXX-RV64-BAREMETAL-NOSYSROOT-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-linux-gnu/8.0.1{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld= -no-pie \ -// RUN: --target=riscv64-unknown-linux-gnu --rtlib=platform -mabi=lp64 \ +// RUN: --target=riscv64-unknown-linux-gnu --rtlib=platform --unwindlib=platform -mabi=lp64 \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ // RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64-LINUX-MULTI-LP64 %s @@ -92,7 +92,7 @@ // C-RV64-LINUX-MULTI-LP64: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld -no-pie \ -// RUN: --target=riscv64-unknown-linux-gnu --rtlib=platform -march=rv64imafd \ +// RUN: --target=riscv64-unknown-linux-gnu --rtlib=platform --unwindlib=platform -march=rv64imafd \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ // RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64-LINUX-MULTI-LP64D %s @@ -107,7 +107,7 @@ // C-RV64-LINUX-MULTI-LP64D: "-L{{.*}}/Inputs/multilib_riscv_linux_sdk/sysroot/usr/lib64/lp64d" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv64-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv64-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: -march=rv64imac -mabi=lp64\ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64IMAC-BAREMETAL-MULTI-LP64 %s @@ -122,7 +122,7 @@ // C-RV64IMAC-BAREMETAL-MULTI-LP64: "{{.*}}/Inputs/multilib_riscv_elf_sdk/lib/gcc/riscv64-unknown-elf/8.2.0/rv64imac/lp64{{/|\\\\}}crtend.o" // RUN: env "PATH=" %clang -### %s -fuse-ld=ld \ -// RUN: --target=riscv64-unknown-elf --rtlib=platform --sysroot= \ +// RUN: --target=riscv64-unknown-elf --rtlib=platform --unwindlib=platform --sysroot= \ // RUN: -march=rv64imafdc -mabi=lp64d \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64IMAFDC-BAREMETAL-MULTI-ILP64D %s @@ -139,7 +139,7 @@ // Check that --rtlib can be used to override the used runtime library // RUN: %clang -### %s \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \ -// RUN: --target=riscv64-unknown-elf --rtlib=libgcc 2>&1 \ +// RUN: --target=riscv64-unknown-elf --rtlib=libgcc --unwindlib=libgcc 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64-RTLIB-LIBGCC-LP64 %s // C-RV64-RTLIB-LIBGCC-LP64: "{{.*}}crt0.o" // C-RV64-RTLIB-LIBGCC-LP64: "{{.*}}crtbegin.o" @@ -148,7 +148,7 @@ // RUN: %clang -### %s \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_elf_sdk \ -// RUN: --target=riscv64-unknown-elf --rtlib=compiler-rt 2>&1 \ +// RUN: --target=riscv64-unknown-elf --rtlib=compiler-rt --unwindlib=compiler-rt 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64-RTLIB-COMPILERRT-LP64 %s // C-RV64-RTLIB-COMPILERRT-LP64: "{{.*}}crt0.o" // C-RV64-RTLIB-COMPILERRT-LP64: "{{.*}}clang_rt.crtbegin-riscv64.o" Index: clang/test/OpenMP/linking.c =================================================================== --- clang/test/OpenMP/linking.c +++ clang/test/OpenMP/linking.c @@ -4,24 +4,24 @@ // FIXME: Replace DEFAULT_OPENMP_LIB below with the value chosen at configure time. // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp -target i386-unknown-linux -rtlib=platform \ +// RUN: -fopenmp -target i386-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" // CHECK-LD-32: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]" // CHECK-LD-32: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp -target x86_64-unknown-linux -rtlib=platform \ +// RUN: -fopenmp -target x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" // CHECK-LD-64: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]" // CHECK-LD-64: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp=libgomp -target i386-unknown-linux -rtlib=platform \ +// RUN: -fopenmp=libgomp -target i386-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-32 %s -// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target i386-unknown-linux -rtlib=platform | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target i386-unknown-linux -rtlib=platform --unwindlib=platform | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: lgomp // SIMD-ONLY2-NOT: lomp // SIMD-ONLY2-NOT: liomp @@ -29,27 +29,27 @@ // CHECK-GOMP-LD-32: "-lgomp" "-lrt" // CHECK-GOMP-LD-32: "-lpthread" "-lc" -// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target i386-unknown-linux -rtlib=platform | FileCheck --check-prefix SIMD-ONLY2 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target i386-unknown-linux -rtlib=platform --unwindlib=platform | FileCheck --check-prefix SIMD-ONLY2 %s // SIMD-ONLY2-NOT: lgomp // SIMD-ONLY2-NOT: lomp // SIMD-ONLY2-NOT: liomp // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp=libgomp -target x86_64-unknown-linux -rtlib=platform \ +// RUN: -fopenmp=libgomp -target x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-64 %s // CHECK-GOMP-LD-64: "{{.*}}ld{{(.exe)?}}" // CHECK-GOMP-LD-64: "-lgomp" "-lrt" // CHECK-GOMP-LD-64: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp -target i386-unknown-linux -rtlib=platform \ +// RUN: -fopenmp -target i386-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s // CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}" // CHECK-IOMP5-LD-32: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]" // CHECK-IOMP5-LD-32: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp -target x86_64-unknown-linux -rtlib=platform \ +// RUN: -fopenmp -target x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s // CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}" // CHECK-IOMP5-LD-64: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]" @@ -67,7 +67,7 @@ // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp -fopenmp=libgomp -target i386-unknown-linux \ -// RUN: -rtlib=platform \ +// RUN: -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-LD-OVERRIDE-32 %s // CHECK-LD-OVERRIDE-32: "{{.*}}ld{{(.exe)?}}" // CHECK-LD-OVERRIDE-32: "-lgomp" "-lrt" @@ -75,14 +75,14 @@ // // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp -fopenmp=libgomp -target x86_64-unknown-linux \ -// RUN: -rtlib=platform \ +// RUN: -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-LD-OVERRIDE-64 %s // CHECK-LD-OVERRIDE-64: "{{.*}}ld{{(.exe)?}}" // CHECK-LD-OVERRIDE-64: "-lgomp" "-lrt" // CHECK-LD-OVERRIDE-64: "-lpthread" "-lc" // // RUN: %clang -no-canonical-prefixes -fuse-ld=link %s -### -o %t.o 2>&1 \ -// RUN: -fopenmp=libomp -target x86_64-msvc-win32 -rtlib=platform \ +// RUN: -fopenmp=libomp -target x86_64-msvc-win32 -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-MSVC-LINK-64 %s // CHECK-MSVC-LINK-64: link.exe // CHECK-MSVC-LINK-64-SAME: -nodefaultlib:vcomp.lib @@ -90,16 +90,16 @@ // CHECK-MSVC-LINK-64-SAME: -libpath:{{.+}}/../lib // CHECK-MSVC-LINK-64-SAME: -defaultlib:libomp.lib -// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target x86_64-msvc-win32 -rtlib=platform | FileCheck --check-prefix SIMD-ONLY11 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target x86_64-msvc-win32 -rtlib=platform --unwindlib=platform | FileCheck --check-prefix SIMD-ONLY11 %s // SIMD-ONLY11-NOT: libiomp // SIMD-ONLY11-NOT: libomp // SIMD-ONLY11-NOT: libgomp // // RUN: %clang -no-canonical-prefixes %s -fuse-ld=link -### -o %t.o 2>&1 \ -// RUN: -fopenmp=libiomp5 -target x86_64-msvc-win32 -rtlib=platform \ +// RUN: -fopenmp=libiomp5 -target x86_64-msvc-win32 -rtlib=platform --unwindlib=platform \ // RUN: | FileCheck --check-prefix=CHECK-MSVC-ILINK-64 %s -// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target x86_64-msvc-win32 -rtlib=platform | FileCheck --check-prefix SIMD-ONLY11 %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 -fopenmp-simd -target x86_64-msvc-win32 -rtlib=platform --unwindlib=platform | FileCheck --check-prefix SIMD-ONLY11 %s // SIMD-ONLY11-NOT: libiomp // SIMD-ONLY11-NOT: libomp // SIMD-ONLY11-NOT: libgomp