diff --git a/clang/test/Driver/riscv32-toolchain-extra.c b/clang/test/Driver/riscv32-toolchain-extra.c --- a/clang/test/Driver/riscv32-toolchain-extra.c +++ b/clang/test/Driver/riscv32-toolchain-extra.c @@ -11,7 +11,6 @@ // The test below checks that the driver correctly finds the linker and // runtime if and only if they exist. // -// REQUIRES: platform-linker // RUN: rm -rf %T/testroot-riscv32-baremetal-nogcc // RUN: mkdir -p %T/testroot-riscv32-baremetal-nogcc/bin // RUN: ln -s %clang %T/testroot-riscv32-baremetal-nogcc/bin/clang @@ -19,11 +18,11 @@ // RUN: ln -s %S/Inputs/basic_riscv32_nogcc_tree/riscv32-unknown-elf %T/testroot-riscv32-baremetal-nogcc/riscv32-unknown-elf // RUN: %T/testroot-riscv32-baremetal-nogcc/bin/clang %s -### -no-canonical-prefixes \ // RUN: --gcc-toolchain=%T/testroot-riscv32-baremetal-nogcc/invalid \ -// RUN: -target riscv32-unknown-elf --rtlib=platform 2>&1 \ +// RUN: -target riscv32-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32-BAREMETAL-ILP32-NOGCC %s // RUN: %T/testroot-riscv32-baremetal-nogcc/bin/clang %s -### -no-canonical-prefixes \ -// RUN: -target riscv32-unknown-elf --rtlib=platform 2>&1 \ +// RUN: -target riscv32-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV32-BAREMETAL-ILP32-NOGCC %s // C-RV32-BAREMETAL-ILP32-NOGCC: "-internal-isystem" "{{.*}}Output/testroot-riscv32-baremetal-nogcc/bin/../riscv32-unknown-elf/include" diff --git a/clang/test/Driver/riscv32-toolchain.c b/clang/test/Driver/riscv32-toolchain.c --- a/clang/test/Driver/riscv32-toolchain.c +++ b/clang/test/Driver/riscv32-toolchain.c @@ -1,5 +1,4 @@ // A basic clang -cc1 command-line, and simple environment check. -// REQUIRES: platform-linker // RUN: %clang %s -### -no-canonical-prefixes -target riscv32 \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv32_tree 2>&1 \ @@ -15,7 +14,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 -### -no-canonical-prefixes \ +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv32-unknown-elf --rtlib=platform \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv32_tree \ // RUN: --sysroot=%S/Inputs/basic_riscv32_tree/riscv32-unknown-elf 2>&1 \ @@ -30,7 +29,7 @@ // C-RV32-BAREMETAL-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // C-RV32-BAREMETAL-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clang %s -### -no-canonical-prefixes \ +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv32-unknown-elf --rtlib=platform \ // RUN: --sysroot= \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv32_tree 2>&1 \ @@ -44,7 +43,7 @@ // C-RV32-BAREMETAL-NOSYSROOT-ILP32: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // C-RV32-BAREMETAL-NOSYSROOT-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clangxx %s -### -no-canonical-prefixes \ +// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv32-unknown-elf -stdlib=libstdc++ --rtlib=platform \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv32_tree \ // RUN: --sysroot=%S/Inputs/basic_riscv32_tree/riscv32-unknown-elf 2>&1 \ @@ -60,7 +59,7 @@ // CXX-RV32-BAREMETAL-ILP32: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // CXX-RV32-BAREMETAL-ILP32: "{{.*}}/Inputs/basic_riscv32_tree/lib/gcc/riscv32-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clangxx %s -### -no-canonical-prefixes \ +// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv32-unknown-elf -stdlib=libstdc++ --rtlib=platform \ // RUN: --sysroot= \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv32_tree 2>&1 \ diff --git a/clang/test/Driver/riscv64-toolchain-extra.c b/clang/test/Driver/riscv64-toolchain-extra.c --- a/clang/test/Driver/riscv64-toolchain-extra.c +++ b/clang/test/Driver/riscv64-toolchain-extra.c @@ -11,7 +11,6 @@ // The test below checks that the driver correctly finds the linker and // runtime if and only if they exist. // -// REQUIRES: platform-linker // RUN: rm -rf %T/testroot-riscv64-baremetal-nogcc // RUN: mkdir -p %T/testroot-riscv64-baremetal-nogcc/bin // RUN: ln -s %clang %T/testroot-riscv64-baremetal-nogcc/bin/clang @@ -19,11 +18,11 @@ // RUN: ln -s %S/Inputs/basic_riscv64_nogcc_tree/riscv64-unknown-elf %T/testroot-riscv64-baremetal-nogcc/riscv64-unknown-elf // RUN: %T/testroot-riscv64-baremetal-nogcc/bin/clang %s -### -no-canonical-prefixes \ // RUN: --gcc-toolchain=%T/testroot-riscv64-baremetal-nogcc/invalid \ -// RUN: -target riscv64-unknown-elf --rtlib=platform 2>&1 \ +// RUN: -target riscv64-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64-BAREMETAL-LP64-NOGCC %s // RUN: %T/testroot-riscv64-baremetal-nogcc/bin/clang %s -### -no-canonical-prefixes \ -// RUN: -target riscv64-unknown-elf --rtlib=platform 2>&1 \ +// RUN: -target riscv64-unknown-elf --rtlib=platform -fuse-ld= 2>&1 \ // RUN: | FileCheck -check-prefix=C-RV64-BAREMETAL-LP64-NOGCC %s // C-RV64-BAREMETAL-LP64-NOGCC: "-internal-isystem" "{{.*}}Output/testroot-riscv64-baremetal-nogcc/bin/../riscv64-unknown-elf/include" diff --git a/clang/test/Driver/riscv64-toolchain.c b/clang/test/Driver/riscv64-toolchain.c --- a/clang/test/Driver/riscv64-toolchain.c +++ b/clang/test/Driver/riscv64-toolchain.c @@ -1,5 +1,4 @@ // A basic clang -cc1 command-line, and simple environment check. -// REQUIRES: platform-linker // RUN: %clang %s -### -no-canonical-prefixes -target riscv64 \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \ @@ -15,7 +14,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 -### -no-canonical-prefixes \ +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv64-unknown-elf --rtlib=platform \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv64_tree \ // RUN: --sysroot=%S/Inputs/basic_riscv64_tree/riscv64-unknown-elf 2>&1 \ @@ -30,7 +29,7 @@ // C-RV64-BAREMETAL-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // C-RV64-BAREMETAL-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clang %s -### -no-canonical-prefixes \ +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv64-unknown-elf --rtlib=platform \ // RUN: --sysroot= \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \ @@ -44,7 +43,7 @@ // C-RV64-BAREMETAL-NOSYSROOT-LP64: "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // C-RV64-BAREMETAL-NOSYSROOT-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clangxx %s -### -no-canonical-prefixes \ +// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv64-unknown-elf -stdlib=libstdc++ --rtlib=platform \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv64_tree \ // RUN: --sysroot=%S/Inputs/basic_riscv64_tree/riscv64-unknown-elf 2>&1 \ @@ -60,7 +59,7 @@ // CXX-RV64-BAREMETAL-LP64: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // CXX-RV64-BAREMETAL-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clangxx %s -### -no-canonical-prefixes \ +// RUN: %clangxx %s -### -no-canonical-prefixes -fuse-ld= \ // RUN: -target riscv64-unknown-elf -stdlib=libstdc++ --rtlib=platform \ // RUN: --sysroot= \ // RUN: --gcc-toolchain=%S/Inputs/basic_riscv64_tree 2>&1 \ @@ -75,7 +74,7 @@ // CXX-RV64-BAREMETAL-NOSYSROOT-LP64: "-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" "-lgcc" // CXX-RV64-BAREMETAL-NOSYSROOT-LP64: "{{.*}}/Inputs/basic_riscv64_tree/lib/gcc/riscv64-unknown-elf/8.0.1{{/|\\\\}}crtend.o" -// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld \ +// RUN: %clang %s -### -no-canonical-prefixes -fuse-ld=ld -fuse-ld= \ // RUN: -target riscv64-unknown-linux-gnu --rtlib=platform -mabi=lp64 \ // RUN: --gcc-toolchain=%S/Inputs/multilib_riscv_linux_sdk \ // RUN: --sysroot=%S/Inputs/multilib_riscv_linux_sdk/sysroot 2>&1 \ diff --git a/clang/test/lit.site.cfg.py.in b/clang/test/lit.site.cfg.py.in --- a/clang/test/lit.site.cfg.py.in +++ b/clang/test/lit.site.cfg.py.in @@ -47,9 +47,6 @@ import lit.llvm lit.llvm.initialize(lit_config, config) -if not "@CLANG_DEFAULT_LINKER@": - config.available_features.add('platform-linker') - # Let the main config do the real work. lit_config.load_config( config, os.path.join(config.clang_src_dir, "test/lit.cfg.py")) diff --git a/llvm/utils/gn/secondary/clang/test/BUILD.gn b/llvm/utils/gn/secondary/clang/test/BUILD.gn --- a/llvm/utils/gn/secondary/clang/test/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/test/BUILD.gn @@ -46,7 +46,6 @@ "LLVM_WITH_Z3=", # Must be empty, not 0. "CLANG_BUILD_EXAMPLES=0", "CLANG_DEFAULT_CXX_STDLIB=", # Empty string means "default value" here. - "CLANG_DEFAULT_LINKER=", "CLANG_TOOLS_DIR=" + rebase_path("$root_out_dir/bin", dir), "CLANG_VENDOR_UTI=org.llvm.clang",