[clang] f599116 - [Driver,test] Remove --gcc-toolchain=""
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 2 10:40:24 PDT 2024
Author: Fangrui Song
Date: 2024-04-02T10:40:19-07:00
New Revision: f5991161529511ca6ebc058da2a0507c2fc5283e
URL: https://github.com/llvm/llvm-project/commit/f5991161529511ca6ebc058da2a0507c2fc5283e
DIFF: https://github.com/llvm/llvm-project/commit/f5991161529511ca6ebc058da2a0507c2fc5283e.diff
LOG: [Driver,test] Remove --gcc-toolchain=""
This option was added so that changing CMake GCC_INSTALL_PREFIX would
not cause test failures or due to cargo culting. Setting
GCC_INSTALL_PREFIX leads to an error now and we should stop making our
tests ugly.
Added:
Modified:
clang/test/Driver/compiler-rt-unwind.c
clang/test/Driver/constructors.c
clang/test/Driver/cuda-detect.cu
clang/test/Driver/dragonfly.c
clang/test/Driver/env.c
clang/test/Driver/haiku.c
clang/test/Driver/hexagon-toolchain-elf.c
clang/test/Driver/linux-header-search.cpp
clang/test/Driver/linux-ld.c
clang/test/Driver/linux-musl-header-search.cpp
clang/test/Driver/linux-per-target-runtime-dir.c
clang/test/Driver/mips-reduced-toolchain.cpp
clang/test/Driver/netbsd.cpp
clang/test/Driver/ohos.c
clang/test/Driver/pic.c
clang/test/Driver/riscv-features.c
clang/test/Driver/solaris-ld-sanitizer.c
clang/test/Driver/solaris-ld-values.c
clang/test/Driver/solaris-ld-values.cpp
clang/test/Driver/solaris-ld.c
Removed:
################################################################################
diff --git a/clang/test/Driver/compiler-rt-unwind.c b/clang/test/Driver/compiler-rt-unwind.c
index 4260dab9302c78..7f4e3f22ab19ae 100644
--- a/clang/test/Driver/compiler-rt-unwind.c
+++ b/clang/test/Driver/compiler-rt-unwind.c
@@ -3,7 +3,7 @@
//
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=platform \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-GCC %s
// RTLIB-GCC: "-lgcc"
// RTLIB-GCC-SAME: "--as-needed"
@@ -12,7 +12,7 @@
//
// RUN: %clangxx -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=platform \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-GXX %s
// RTLIB-GXX: "-lgcc"
// RTLIB-GXX-NOT: "--as-needed"
@@ -21,11 +21,11 @@
//
// RUN: not %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER-RT %s
// RUN: not %clangxx -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER-RT %s
// RTLIB-GCC-UNWINDLIB-COMPILER-RT: "-lgcc"
// RTLIB-GCC-UNWINDLIB-COMPILER-RT-SAME: "--as-needed"
@@ -35,7 +35,7 @@
// RUN: not %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
// RUN: -shared-libgcc \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-GCC-SHARED-UNWINDLIB-COMPILER-RT %s
// RTLIB-GCC-SHARED-UNWINDLIB-COMPILER-RT: "-l:libunwind.so"
// RTLIB-GCC-SHARED-UNWINDLIB-COMPILER-RT-SAME: "-lgcc"
@@ -43,24 +43,24 @@
// RUN: not %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
// RUN: -static-libgcc \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-GCC-STATIC-UNWINDLIB-COMPILER-RT %s
// RTLIB-GCC-STATIC-UNWINDLIB-COMPILER-RT: "-lgcc"
// RTLIB-GCC-STATIC-UNWINDLIB-COMPILER-RT-SAME: "-l:libunwind.a"
//
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=compiler-rt \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-COMPILER-RT %s
// RTLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins.a"
//
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=compiler-rt --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT %s
// RUN: %clangxx -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=compiler-rt --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT %s
// RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins.a"
// RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT-SAME: "--as-needed"
@@ -69,21 +69,21 @@
//
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=compiler-rt --unwindlib=libgcc \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-COMPILER-RT-UNWINDLIB-GCC %s
// RTLIB-COMPILER-RT-UNWINDLIB-GCC: "{{.*}}libclang_rt.builtins.a"
// RTLIB-COMPILER-RT-UNWINDLIB-GCC-SAME: "-lgcc_s"
//
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=compiler-rt --unwindlib=libgcc \
-// RUN: -static --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -static -resource-dir=%S/Inputs/resource_dir \
// RUN: | FileCheck --check-prefix=RTLIB-COMPILER-RT-UNWINDLIB-GCC-STATIC %s
// RTLIB-COMPILER-RT-UNWINDLIB-GCC-STATIC: "{{.*}}libclang_rt.builtins.a"
// RTLIB-COMPILER-RT-UNWINDLIB-GCC-STATIC-SAME: "-lgcc_eh"
//
// RUN: not %clang %s 2> %t.err \
// RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: FileCheck --input-file=%t.err --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER_RT %s
// RTLIB-GCC-UNWINDLIB-COMPILER_RT: "{{[.|\\\n]*}}--rtlib=libgcc requires --unwindlib=libgcc"
//
@@ -97,7 +97,6 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-w64-mingw32 -rtlib=compiler-rt --unwindlib=libunwind \
// RUN: -shared-libgcc \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=MINGW-RTLIB-COMPILER-RT-SHARED-UNWINDLIB-COMPILER-RT %s
// MINGW-RTLIB-COMPILER-RT-SHARED-UNWINDLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins-x86_64.a"
// MINGW-RTLIB-COMPILER-RT-SHARED-UNWINDLIB-COMPILER-RT-SAME: "-l:libunwind.dll.a"
@@ -105,18 +104,15 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-w64-mingw32 -rtlib=compiler-rt --unwindlib=libunwind \
// RUN: -static-libgcc \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=MINGW-RTLIB-COMPILER-RT-STATIC-UNWINDLIB-COMPILER-RT %s
// MINGW-RTLIB-COMPILER-RT-STATIC-UNWINDLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins-x86_64.a"
// MINGW-RTLIB-COMPILER-RT-STATIC-UNWINDLIB-COMPILER-RT-SAME: "-l:libunwind.a"
//
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-w64-mingw32 -rtlib=compiler-rt --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT %s
// RUN: %clangxx -### %s 2>&1 \
// RUN: --target=x86_64-w64-mingw32 -rtlib=compiler-rt --unwindlib=libunwind \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT %s
// MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins-x86_64.a"
// MINGW-RTLIB-COMPILER-RT-UNWINDLIB-COMPILER-RT-SAME: "-lunwind"
diff --git a/clang/test/Driver/constructors.c b/clang/test/Driver/constructors.c
index 1cb3aec840c2d9..570b6ec94617f2 100644
--- a/clang/test/Driver/constructors.c
+++ b/clang/test/Driver/constructors.c
@@ -7,58 +7,49 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/resource_dir \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/fake_install_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: -fno-use-init-array \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/fake_install_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-NO-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: -fno-use-init-array -fuse-init-array \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/fake_install_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: -fuse-init-array \
// RUN: --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=arm-unknown-linux-androideabi \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=i386-unknown-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=aarch64-none-linux-gnu \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
@@ -68,7 +59,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=arm64-none-linux-gnu \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
//
// RUN: %clang -### %s -fsyntax-only 2>&1 \
diff --git a/clang/test/Driver/cuda-detect.cu b/clang/test/Driver/cuda-detect.cu
index 49e58004e672c3..67af470018ff96 100644
--- a/clang/test/Driver/cuda-detect.cu
+++ b/clang/test/Driver/cuda-detect.cu
@@ -146,8 +146,8 @@
// Verify that C++ include paths are passed for both host and device frontends.
// RUN: %clang -### --target=x86_64-linux-gnu %s \
-// RUN: --stdlib=libstdc++ --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 \
-// RUN: -nogpulib -nogpuinc --gcc-toolchain="" 2>&1 \
+// RUN: --stdlib=libstdc++ --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 \
+// RUN: -nogpulib -nogpuinc 2>&1 \
// RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE
// Verify that CUDA SDK version is propagated to the CC1 compilations.
diff --git a/clang/test/Driver/dragonfly.c b/clang/test/Driver/dragonfly.c
index 931f23f6f57b5f..33c4e4c77eac5e 100644
--- a/clang/test/Driver/dragonfly.c
+++ b/clang/test/Driver/dragonfly.c
@@ -5,7 +5,6 @@
// Check x86_64-unknown-dragonfly, X86_64
// RUN: %clang -### %s 2>&1 --target=x86_64-unknown-dragonfly \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_dragonfly_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X86_64 %s
// CHECK-LD-X86_64: "-cc1" "-triple" "x86_64-unknown-dragonfly"
diff --git a/clang/test/Driver/env.c b/clang/test/Driver/env.c
index 40a42dc9618576..3f56c7fdae9022 100644
--- a/clang/test/Driver/env.c
+++ b/clang/test/Driver/env.c
@@ -8,13 +8,13 @@
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: --rtlib=platform --unwindlib=platform -no-pie \
-// RUN: --gcc-toolchain="" 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
+// RUN: 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 --unwindlib=platform -no-pie \
-// RUN: --gcc-toolchain="" 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
+// RUN: 2>&1 | FileCheck --check-prefix=CHECK-LD-32 %s
//
// CHECK-LD-32-NOT: warning:
// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
diff --git a/clang/test/Driver/haiku.c b/clang/test/Driver/haiku.c
index 060a56b3c70e56..3f421ab6e81e68 100644
--- a/clang/test/Driver/haiku.c
+++ b/clang/test/Driver/haiku.c
@@ -39,7 +39,6 @@
// Check x86_64-unknown-haiku, X86_64
// RUN: %clang -### %s 2>&1 --target=x86_64-unknown-haiku \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/haiku_x86_64_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X86_64 %s
// CHECK-LD-X86_64: "-cc1" "-triple" "x86_64-unknown-haiku"
@@ -63,7 +62,6 @@
// Check the right flags are present with -shared
// RUN: %clang -### %s -shared 2>&1 --target=x86_64-unknown-haiku \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/haiku_x86_64_tree \
// RUN: | FileCheck --check-prefix=CHECK-X86_64-SHARED %s
// CHECK-X86_64-SHARED: "-cc1" "-triple" "x86_64-unknown-haiku"
diff --git a/clang/test/Driver/hexagon-toolchain-elf.c b/clang/test/Driver/hexagon-toolchain-elf.c
index da859a144cfc88..ac921547266c95 100644
--- a/clang/test/Driver/hexagon-toolchain-elf.c
+++ b/clang/test/Driver/hexagon-toolchain-elf.c
@@ -36,7 +36,6 @@
// RUN: %clangxx -### --target=hexagon-unknown-elf -fno-integrated-as \
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
-// RUN: --gcc-toolchain="" \
// RUN: -nostdlibinc %s 2>&1 | FileCheck -check-prefix=CHECK113 %s
// CHECK113: "-cc1"
// CHECK113-NOT: "-internal-isystem"
diff --git a/clang/test/Driver/linux-header-search.cpp b/clang/test/Driver/linux-header-search.cpp
index dd4d6eb483a3fb..70a85deac89e40 100644
--- a/clang/test/Driver/linux-header-search.cpp
+++ b/clang/test/Driver/linux-header-search.cpp
@@ -9,7 +9,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s
// CHECK-BASIC-LIBCXX-SYSROOT: "-cc1"
// CHECK-BASIC-LIBCXX-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -24,7 +23,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree/ \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT-SLASH %s
// CHECK-BASIC-LIBCXX-SYSROOT-SLASH: "-cc1"
// CHECK-BASIC-LIBCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
@@ -38,7 +36,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s
// CHECK-BASIC-LIBCXX-INSTALL: "-cc1"
// CHECK-BASIC-LIBCXX-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -52,7 +49,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxxv2_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXXV2-SYSROOT %s
// CHECK-BASIC-LIBCXXV2-SYSROOT: "-cc1"
// CHECK-BASIC-LIBCXXV2-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -65,7 +61,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxxv2_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxxv2_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXXV2-INSTALL %s
// CHECK-BASIC-LIBCXXV2-INSTALL: "-cc1"
// CHECK-BASIC-LIBCXXV2-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -80,7 +75,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libstdcxx_tree/ \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH %s
// CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH: "-cc1"
// CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
@@ -93,7 +87,6 @@
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libstdcxx_libcxxv2_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT %s
// CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-cc1"
// CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -106,7 +99,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.6.2_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-6-2 %s
// CHECK-GENTOO-4-6-2: "-cc1"
// CHECK-GENTOO-4-6-2: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -121,7 +113,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.6.4_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-6-4 %s
// CHECK-GENTOO-4-6-4: "-cc1"
// CHECK-GENTOO-4-6-4: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -136,7 +127,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.3_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3 %s
// CHECK-GENTOO-4-9-3: "-cc1"
// CHECK-GENTOO-4-9-3: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -155,14 +145,12 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3 %s
//
// Test that gcc-config support does not break multilib.
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnux32 -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3-X32 %s
// CHECK-GENTOO-4-9-3-X32: "-cc1"
// CHECK-GENTOO-4-9-3-X32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -178,7 +166,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=i386-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3-32 %s
// CHECK-GENTOO-4-9-3-32: "-cc1"
// CHECK-GENTOO-4-9-3-32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -198,7 +185,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.x_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-X %s
//
// CHECK-GENTOO-4-9-X: "-cc1"
@@ -215,7 +201,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnux32 -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.x_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-X-X32 %s
// CHECK-GENTOO-4-9-X-X32: "-cc1"
// CHECK-GENTOO-4-9-X-X32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -231,7 +216,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=i386-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.x_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-X-32 %s
// CHECK-GENTOO-4-9-X-32: "-cc1"
// CHECK-GENTOO-4-9-X-32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -248,14 +232,12 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=loongarch64-unknown-linux-gnu -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/debian_loong64_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-LOONG64-GNU %s
//
// Check that "-gnuf64" is seen as "-gnu" for loong64.
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=loongarch64-unknown-linux-gnuf64 -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/debian_loong64_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-LOONG64-GNU %s
// CHECK-LOONG64-GNU: "-cc1"
// CHECK-LOONG64-GNU: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -274,7 +256,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=mips64-unknown-linux-gnuabi64 -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64-GNUABI %s
// CHECK-MIPS64-GNUABI: "-cc1"
// CHECK-MIPS64-GNUABI: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -292,7 +273,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=mips64el-unknown-linux-gnuabi64 -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-GNUABI %s
// CHECK-MIPS64EL-GNUABI: "-cc1"
// CHECK-MIPS64EL-GNUABI: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -311,7 +291,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=arm-oe-linux-gnueabi -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/openembedded_arm_linux_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-OE-ARM %s
// CHECK-OE-ARM: "-cc1"
@@ -323,7 +302,6 @@
// RUN: %clang -### %s -fsyntax-only 2>&1 \
// RUN: --target=aarch64-oe-linux -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/openembedded_aarch64_linux_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-OE-AARCH64 %s
// CHECK-OE-AARCH64: "-cc1"
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index d77367b4ece7b9..4020b138dc8fde 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -4,7 +4,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-LD-32-NOT: warning:
@@ -17,7 +16,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-64 %s
// CHECK-LD-64-NOT: warning:
@@ -36,7 +34,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X32 %s
// CHECK-LD-X32-NOT: warning:
@@ -51,7 +48,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux \
// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: --rtlib=compiler-rt \
// RUN: | FileCheck --check-prefix=CHECK-LD-RT %s
@@ -74,7 +70,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-unknown-linux \
// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: --rtlib=compiler-rt \
// RUN: | FileCheck --check-prefix=CHECK-LD-RT-I686 %s
@@ -96,7 +91,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: --rtlib=compiler-rt \
// RUN: | FileCheck --check-prefix=CHECK-LD-RT-ANDROID %s
@@ -111,7 +105,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-GCC %s
// CHECK-LD-GCC-NOT: warning:
@@ -131,7 +124,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
// RUN: -static-libgcc \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC-LIBGCC %s
// CHECK-LD-64-STATIC-LIBGCC-NOT: warning:
@@ -150,7 +142,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-NO-LIBGCC %s
// CHECK-CLANG-NO-LIBGCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -160,7 +151,6 @@
//
// RUN: %clangxx -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANGXX-NO-LIBGCC %s
// CHECK-CLANGXX-NO-LIBGCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -170,7 +160,6 @@
//
// RUN: %clang -static -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-NO-LIBGCC-STATIC %s
// CHECK-CLANG-NO-LIBGCC-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -178,7 +167,6 @@
//
// RUN: %clang -static-pie -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-LD-STATIC-PIE %s
// CHECK-CLANG-LD-STATIC-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -189,7 +177,6 @@
//
// RUN: not %clang -static-pie -pie -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-LD-STATIC-PIE-PIE %s
// CHECK-CLANG-LD-STATIC-PIE-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -200,7 +187,6 @@
//
// RUN: not %clang -static-pie -static -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-LD-STATIC-PIE-STATIC %s
// CHECK-CLANG-LD-STATIC-PIE-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -211,14 +197,12 @@
//
// RUN: not %clang -static-pie -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-LD-STATIC-PIE-NOPIE %s
// CHECK-CLANG-LD-STATIC-PIE-NOPIE: error: cannot specify 'nopie' along with 'static-pie'
//
// RUN: %clang -dynamic -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-NO-LIBGCC-DYNAMIC %s
// CHECK-CLANG-NO-LIBGCC-DYNAMIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -228,7 +212,6 @@
//
// RUN: %clang -static-libgcc -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-STATIC-LIBGCC %s
// CHECK-CLANG-STATIC-LIBGCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -238,7 +221,6 @@
//
// RUN: %clang -static-libgcc -dynamic -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-STATIC-LIBGCC-DYNAMIC %s
// CHECK-CLANG-STATIC-LIBGCC-DYNAMIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -248,7 +230,6 @@
//
// RUN: %clang -shared-libgcc -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-SHARED-LIBGCC %s
// CHECK-CLANG-SHARED-LIBGCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -258,7 +239,6 @@
//
// RUN: %clang -shared-libgcc -dynamic -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-SHARED-LIBGCC-DYNAMIC %s
// CHECK-CLANG-SHARED-LIBGCC-DYNAMIC: "-lgcc_s" "-lgcc"
@@ -267,7 +247,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-ANDROID-NONE %s
// CHECK-CLANG-ANDROID-NONE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -275,7 +254,6 @@
//
// RUN: %clang -shared -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-ANDROID-SHARED %s
// CHECK-CLANG-ANDROID-SHARED: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -283,7 +261,6 @@
//
// RUN: %clang -static -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-CLANG-ANDROID-STATIC %s
// CHECK-CLANG-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -292,7 +269,6 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
// RUN: -static \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s
// CHECK-LD-64-STATIC-NOT: warning:
@@ -309,7 +285,7 @@
// CHECK-LD-64-STATIC: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group"
// RUN: %clang -no-pie -### %s --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform -shared -static \
-// RUN: --gcc-toolchain= --sysroot=%S/Inputs/basic_linux_tree 2>&1 | FileCheck --check-prefix=CHECK-LD-SHARED-STATIC %s
+// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 | FileCheck --check-prefix=CHECK-LD-SHARED-STATIC %s
// CHECK-LD-SHARED-STATIC: "-shared" "-static"
// CHECK-LD-SHARED-STATIC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/10.2.0{{/|\\\\}}crtbeginS.o"
// CHECK-LD-SHARED-STATIC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/10.2.0{{/|\\\\}}crtendS.o"
@@ -318,13 +294,11 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \
// RUN: -static-libgcc -static \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -340,7 +314,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -356,7 +329,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-64-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -372,7 +344,6 @@
//
// RUN: not %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-64-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -388,7 +359,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -404,7 +374,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-64-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -420,7 +389,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-32-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -436,7 +404,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-X32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -452,7 +419,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-X32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -484,7 +450,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 \
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s
// CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -496,7 +461,6 @@
// RUN: --target=x86_64-unknown-linux-gnu \
// RUN: -stdlib=libc++ \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
-// RUN: --gcc-toolchain="" \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s
@@ -509,7 +473,6 @@
// RUN: --target=x86_64-unknown-linux-gnu \
// RUN: -stdlib=libc++ \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
-// RUN: --gcc-toolchain="" \
// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s
@@ -525,7 +488,6 @@
// RUN: --target=x86_64-unknown-linux-gnu \
// RUN: -stdlib=libc++ \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-C-LINK %s
// CHECK-BASIC-LIBCXX-C-LINK-NOT: warning:
@@ -538,7 +500,6 @@
// Check multi arch support on Ubuntu 12.04 LTS.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
//
@@ -547,7 +508,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-unknown-linux-musleabihf -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
// CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -563,7 +523,6 @@
// 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 --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
// CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -582,7 +541,6 @@
// 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 --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
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -601,7 +559,6 @@
// Check Ubuntu 14.04 on powerpc64le.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -618,7 +575,6 @@
// "/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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-X32 %s
// CHECK-UBUNTU-14-04-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -635,7 +591,6 @@
// Check fedora 18 on arm.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-FEDORA-18-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -650,12 +605,10 @@
// Check Fedora 21 on AArch64.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/fedora_21_tree \
// RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
// CHECK-FEDORA-21-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -670,7 +623,6 @@
// Check Fedora 31 on riscv64.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-FEDORA-31-RISCV64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -684,7 +636,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-UBUNTU-12-04-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -700,7 +651,6 @@
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \
// RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s
// CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -713,12 +663,10 @@
// Check openSuse Leap 42.2 on AArch64
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s
// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -733,12 +681,10 @@
// Check openSUSE Tumbleweed on armv6hl
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv6hl_tree \
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV6HL %s
// CHECK-OPENSUSE-TW-ARMV6HL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -753,12 +699,10 @@
// Check openSUSE Tumbleweed on armv7hl
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_armv7hl_tree \
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-ARMV7HL %s
// CHECK-OPENSUSE-TW-ARMV7HL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -773,12 +717,10 @@
// Check openSUSE Tumbleweed on riscv64
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_riscv64_tree \
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-RISCV64 %s
// CHECK-OPENSUSE-TW-RISCV64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -793,7 +735,6 @@
// Check openSUSE Tumbleweed on ppc
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-OPENSUSE-TW-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1048,32 +989,26 @@
// Test linker invocation on Android.
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1090,19 +1025,16 @@
// CHECK-ANDROID: "{{.*}}{{/|\\\\}}crtend_android.o"
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
@@ -1113,13 +1045,11 @@
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
@@ -1136,7 +1066,6 @@
// CHECK-ANDROID-SO: "{{.*}}{{/|\\\\}}crtend_so.o"
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
@@ -1147,7 +1076,6 @@
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
@@ -1158,13 +1086,11 @@
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
@@ -1180,37 +1106,31 @@
// CHECK-ANDROID-STATIC: "{{.*}}{{/|\\\\}}crtend_android.o"
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
@@ -1225,32 +1145,26 @@
// CHECK-ANDROID-PIE: "{{.*}}{{/|\\\\}}crtend_android.o"
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-android \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm64-linux-android \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
// CHECK-ANDROID-32: "-dynamic-linker" "/system/bin/linker"
@@ -1260,13 +1174,11 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: -fsanitize=hwaddress \
// RUN: --target=x86_64-linux-android33 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-OLD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: -fsanitize=hwaddress \
// RUN: --target=x86_64-linux-android34 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-NEW %s
// CHECK-ANDROID-OLD: "-dynamic-linker" "/system/bin/linker64"
@@ -1275,67 +1187,55 @@
// Test that -pthread does not add -lpthread on Android.
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm64-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-androideabi -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm64-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-linux-android -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
@@ -1343,20 +1243,19 @@
//
// RUN: not %clang %t.o -no-pie -### -o %t 2>&1 \
// RUN: --target=arm-linux-androideabi -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD-LINK %s
// CHECK-ANDROID-PTHREAD-LINK-NOT: argument unused during compilation: '-pthread'
/// Check -fandroid-pad-segment.
// RUN: %clang -### %s --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -fandroid-pad-segment 2>&1 | FileCheck --check-prefix=CHECK-ANDROID-PAD-PHDR %s
// CHECK-ANDROID-PAD-PHDR: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-ANDROID-PAD-PHDR: "[[SYSROOT]]/usr/lib/crtbegin_dynamic.o" "[[SYSROOT]]/usr/lib/crt_pad_segment.o"
// RUN: %clang -### %s --target=aarch64-linux-android -rtlib=platform --unwindlib=platform \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -fandroid-pad-segment -fno-android-pad-segment 2>&1 | FileCheck --check-prefix=CHECK-NO-ANDROID-PAD-PHDR %s
// CHECK-NO-ANDROID-PAD-PHDR: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-NO-ANDROID-PAD-PHDR: "[[SYSROOT]]/usr/lib/crtbegin_dynamic.o"
@@ -1368,14 +1267,12 @@
// Check linker invocation on a Debian LoongArch sysroot.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/debian_loong64_tree \
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-LOONG64 %s
// CHECK-DEBIAN-ML-LOONG64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1391,7 +1288,6 @@
// Check linker invocation on Debian 6 MIPS 32/64-bit.
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-DEBIAN-ML-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1407,7 +1303,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1423,7 +1318,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1439,7 +1333,6 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-DEBIAN-ML-MIPS64EL-O32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1455,12 +1348,10 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --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
// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1477,12 +1368,10 @@
//
// RUN: %clang -### %s -no-pie 2>&1 \
// 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 --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
// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1500,7 +1389,6 @@
// Test linker invocation for Freescale SDK (OpenEmbedded).
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-FSL-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1510,7 +1398,6 @@
// CHECK-FSL-PPC: "-L[[SYSROOT]]/usr/lib"
// RUN: %clang -### %s -no-pie 2>&1 \
// 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
// CHECK-FSL-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1520,53 +1407,41 @@
//
// Check that crtfastmath.o is linked with -ffast-math and with -Ofast.
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -ffast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -funsafe-math-optimizations\
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -Ofast\
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -Ofast -O3\
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -O3 -Ofast\
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -ffast-math -fno-fast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -Ofast -fno-fast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -Ofast -fno-unsafe-math-optimizations \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -fno-fast-math -Ofast \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// RUN: %clang --target=x86_64-unknown-linux -no-pie -### %s -fno-unsafe-math-optimizations -Ofast \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s
// We don't have crtfastmath.o in the i386 tree, use it to check that file
// detection works.
// RUN: %clang --target=i386-unknown-linux -no-pie -### %s -ffast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s
// CHECK-CRTFASTMATH: usr/lib/gcc/x86_64-unknown-linux/10.2.0{{/|\\\\}}crtfastmath.o
@@ -1574,21 +1449,18 @@
// Check that we link in gcrt1.o when compiling with -pg
// RUN: %clang -pg --target=x86_64-unknown-linux -no-pie -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \
// RUN: | FileCheck --check-prefix=CHECK-PG %s
// CHECK-PG: gcrt1.o
// GCC forwards -u to the linker.
// RUN: %clang -u asdf --target=x86_64-unknown-linux -no-pie -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \
// RUN: | FileCheck --check-prefix=CHECK-u %s
// CHECK-u: "-u" "asdf"
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armeb-unknown-linux \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMEB %s
// CHECK-ARMEB: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1598,7 +1470,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armebv7-unknown-linux \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EB %s
// CHECK-ARMV7EB: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1609,20 +1480,17 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armv7-unknown-linux \
// RUN: -mbig-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EB %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armebv7-unknown-linux \
// RUN: -mbig-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EB %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armv7-unknown-linux \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EL %s
// CHECK-ARMV7EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1633,20 +1501,17 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armebv7-unknown-linux \
// RUN: -mlittle-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EL %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=armv7-unknown-linux \
// RUN: -mlittle-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-ARMV7EL %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64_be-unknown-linux \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-AARCH64BE %s
// CHECK-AARCH64BE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1657,20 +1522,17 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-unknown-linux \
// RUN: -mbig-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-AARCH64BE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64_be-unknown-linux \
// RUN: -mbig-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-AARCH64BE %s
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-unknown-linux \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-AARCH64LE %s
// CHECK-AARCH64LE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1681,7 +1543,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64_be-unknown-linux \
// RUN: -mlittle-endian \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-AARCH64LE %s
@@ -1775,7 +1636,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnu -rtlib=platform --unwindlib=platform \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-LD-GENTOO %s
// CHECK-LD-GENTOO-NOT: warning:
// CHECK-LD-GENTOO: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1791,7 +1651,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=i686-unknown-linux-gnu -rtlib=platform --unwindlib=platform \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-LD-GENTOO-32 %s
// CHECK-LD-GENTOO-32-NOT: warning:
// CHECK-LD-GENTOO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1807,7 +1666,6 @@
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-unknown-linux-gnux32 -rtlib=platform --unwindlib=platform \
// RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-LD-GENTOO-X32 %s
// CHECK-LD-GENTOO-X32-NOT: warning:
// CHECK-LD-GENTOO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -1833,7 +1691,6 @@
// Check whether gcc7 install works fine on Amazon Linux AMI
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=x86_64-amazon-linux -rtlib=libgcc --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/ami_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-AMI %s
// CHECK-LD-AMI-NOT: warning:
@@ -1853,7 +1710,6 @@
// Check whether the OpenEmbedded ARM libs are added correctly.
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=arm-oe-linux-gnueabi -rtlib=libgcc --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/openembedded_arm_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-OE-ARM %s
@@ -1872,7 +1728,6 @@
// Check whether the OpenEmbedded AArch64 libs are added correctly.
// RUN: %clang -### %s -no-pie 2>&1 \
// RUN: --target=aarch64-oe-linux -rtlib=libgcc --unwindlib=platform \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/openembedded_aarch64_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-OE-AARCH64 %s
diff --git a/clang/test/Driver/linux-musl-header-search.cpp b/clang/test/Driver/linux-musl-header-search.cpp
index c6d958583d0158..acff5b71aa65a8 100644
--- a/clang/test/Driver/linux-musl-header-search.cpp
+++ b/clang/test/Driver/linux-musl-header-search.cpp
@@ -2,7 +2,7 @@
// RUN: --target=x86_64-linux-musl -stdlib=libc++ \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree --gcc-toolchain= \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-X86-64-LIBCXX %s
// RESOURCE_DIR/include comes after /usr/include on linux-musl.
@@ -18,7 +18,7 @@
// RUN: --target=x86_64-linux-musl \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree --gcc-toolchain= \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-NOBUILTININC %s
// CHECK-NOBUILTININC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
@@ -28,7 +28,7 @@
// RUN: --target=x86_64-linux-musl \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
// RUN: -resource-dir=%S/Inputs/resource_dir \
-// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree --gcc-toolchain= \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-NOSTDLIBINC %s
// CHECK-NOSTDLIBINC: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
diff --git a/clang/test/Driver/linux-per-target-runtime-dir.c b/clang/test/Driver/linux-per-target-runtime-dir.c
index 8c721d82821f6a..97e746f57eda13 100644
--- a/clang/test/Driver/linux-per-target-runtime-dir.c
+++ b/clang/test/Driver/linux-per-target-runtime-dir.c
@@ -3,7 +3,6 @@
// RUN: -stdlib=libc++ \
// RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \
// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
// RUN: | FileCheck --check-prefix=CHECK-PER-TARGET-RUNTIME %s
// CHECK-PER-TARGET-RUNTIME: "-cc1"
diff --git a/clang/test/Driver/mips-reduced-toolchain.cpp b/clang/test/Driver/mips-reduced-toolchain.cpp
index 54d269562b3a23..4c15271f7a5f55 100644
--- a/clang/test/Driver/mips-reduced-toolchain.cpp
+++ b/clang/test/Driver/mips-reduced-toolchain.cpp
@@ -4,7 +4,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=mips-linux-gnu \
// RUN: --sysroot=%S/Inputs/debian_reduced_mips_tree \
-// RUN: --gcc-toolchain="" -no-pie \
+// RUN: -no-pie \
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS %s
// CHECK-DEBIAN-MIPS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-DEBIAN-MIPS: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.7{{/|\\\\}}crtbegin.o"
@@ -16,7 +16,7 @@
// RUN: %clang -### %s 2>&1 \
// RUN: --target=mipsel-linux-gnu \
// RUN: --sysroot=%S/Inputs/debian_reduced_mips_tree \
-// RUN: --gcc-toolchain="" -no-pie \
+// RUN: -no-pie \
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPSEL %s
// CHECK-DEBIAN-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-DEBIAN-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.7{{/|\\\\}}crtbegin.o"
diff --git a/clang/test/Driver/netbsd.cpp b/clang/test/Driver/netbsd.cpp
index f63391580ad0ba..6b8a86d6ee532c 100644
--- a/clang/test/Driver/netbsd.cpp
+++ b/clang/test/Driver/netbsd.cpp
@@ -196,7 +196,6 @@
// RUN: --target=x86_64-unknown-netbsd \
// RUN: -stdlib=libstdc++ \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree/ \
-// RUN: --gcc-toolchain="" \
// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH %s
// CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH: "-cc1"
// CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
diff --git a/clang/test/Driver/ohos.c b/clang/test/Driver/ohos.c
index dfb7981525fd2a..b1ce61e7227b6b 100644
--- a/clang/test/Driver/ohos.c
+++ b/clang/test/Driver/ohos.c
@@ -230,7 +230,6 @@
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=arm64-linux-ohos -pthread \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/ohos_native_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-OHOS-PTHREAD %s
diff --git a/clang/test/Driver/pic.c b/clang/test/Driver/pic.c
index aeddead6dbf8f4..f5d07454227906 100644
--- a/clang/test/Driver/pic.c
+++ b/clang/test/Driver/pic.c
@@ -128,15 +128,15 @@
// Make sure -pie is passed to along to ld and that the right *crt* files
// are linked in.
// RUN: %clang %s -target i386-unknown-freebsd -fPIE -pie -### \
-// RUN: --gcc-toolchain="" -rtlib=platform \
+// RUN: -rtlib=platform \
// 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 --unwindlib=platform \
+// RUN: -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 --unwindlib=platform \
+// RUN: -rtlib=platform --unwindlib=platform \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE-LD
//
@@ -149,7 +149,6 @@
// RUN: %clang -c %s -target i386-unknown-unknown -static -fPIC -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIC2
// RUN: %clang %s -target i386-linux-gnu -static -fPIC -### \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-STATIC
//
diff --git a/clang/test/Driver/riscv-features.c b/clang/test/Driver/riscv-features.c
index 052956dfa2dcea..ce4947d2bc47b4 100644
--- a/clang/test/Driver/riscv-features.c
+++ b/clang/test/Driver/riscv-features.c
@@ -41,10 +41,10 @@
// FAST-UNALIGNED-ACCESS: "-target-feature" "+fast-unaligned-access"
// NO-FAST-UNALIGNED-ACCESS: "-target-feature" "-fast-unaligned-access"
-// RUN: %clang --target=riscv32-unknown-elf --gcc-toolchain="" -### %s 2>&1 | FileCheck %s -check-prefix=NOUWTABLE
-// RUN: %clang --target=riscv32-unknown-elf --gcc-toolchain="" -fasynchronous-unwind-tables -### %s 2>&1 | FileCheck %s -check-prefix=UWTABLE
-// RUN: %clang --target=riscv64-unknown-elf --gcc-toolchain="" -### %s 2>&1 | FileCheck %s -check-prefix=NOUWTABLE
-// RUN: %clang --target=riscv64-unknown-elf --gcc-toolchain="" -fasynchronous-unwind-tables -### %s 2>&1 | FileCheck %s -check-prefix=UWTABLE
+// RUN: %clang --target=riscv32-unknown-elf -### %s 2>&1 | FileCheck %s -check-prefix=NOUWTABLE
+// RUN: %clang --target=riscv32-unknown-elf -fasynchronous-unwind-tables -### %s 2>&1 | FileCheck %s -check-prefix=UWTABLE
+// RUN: %clang --target=riscv64-unknown-elf -### %s 2>&1 | FileCheck %s -check-prefix=NOUWTABLE
+// RUN: %clang --target=riscv64-unknown-elf -fasynchronous-unwind-tables -### %s 2>&1 | FileCheck %s -check-prefix=UWTABLE
//
// UWTABLE: "-funwind-tables=2"
// NOUWTABLE-NOT: "-funwind-tables=2"
diff --git a/clang/test/Driver/solaris-ld-sanitizer.c b/clang/test/Driver/solaris-ld-sanitizer.c
index a59164787cada1..fbbd83f2d9e528 100644
--- a/clang/test/Driver/solaris-ld-sanitizer.c
+++ b/clang/test/Driver/solaris-ld-sanitizer.c
@@ -4,47 +4,47 @@
/// Check sparc-sun-solaris2.11, 32bit
// RUN: %clang --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
/// Check sparc-sun-solaris2.11, 32bit
// RUN: %clang -fsanitize=undefined --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
/// Check sparc-sun-solaris2.11, 64bit
// RUN: %clang -m64 --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
/// Check sparc-sun-solaris2.11, 64bit
// RUN: %clang -m64 -fsanitize=undefined --target=sparc-sun-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
/// Check i386-pc-solaris2.11, 32bit
// RUN: %clang --target=i386-pc-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
/// Check i386-pc-solaris2.11, 32bit
// RUN: %clang -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
/// Check i386-pc-solaris2.11, 64bit
// RUN: %clang -m64 --target=i386-pc-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD %s
// CHECK-LD-NOT: "-z" "relax=transtls"
/// Check i386-pc-solaris2.11, 64bit
// RUN: %clang -m64 -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld= \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD-X64-UBSAN %s
// RUN: %clang -m64 -fsanitize=undefined --target=i386-pc-solaris2.11 %s -### -fuse-ld=gld \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-GLD-X64-UBSAN %s
// CHECK-LD-X64-UBSAN: "-z" "relax=transtls"
@@ -56,12 +56,12 @@
/// Check i386-pc-solaris2.11, 32bit, shared libclang_rt.asan
// RUN: %clang -fsanitize=address -shared-libasan --target=i386-pc-solaris2.11 %s -### 2>&1 \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X32-ASAN-SHARED %s
// CHECK-LD-X32-ASAN-SHARED: "-z" "now"
/// Check i386-pc-solaris2.11, 32bit, static libclang_rt.asan
// RUN: %clang -fsanitize=address --target=i386-pc-solaris2.11 %s -### 2>&1 \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_x86_tree \
+// RUN: --sysroot=%S/Inputs/solaris_x86_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X32-ASAN %s
// CHECK-LD-X32-ASAN-NOT: "-z" "now"
diff --git a/clang/test/Driver/solaris-ld-values.c b/clang/test/Driver/solaris-ld-values.c
index d7b6734f9f91ec..6f0a5b5957f014 100644
--- a/clang/test/Driver/solaris-ld-values.c
+++ b/clang/test/Driver/solaris-ld-values.c
@@ -5,7 +5,6 @@
// Check sparc-sun-solaris2.11, 32bit
// RUN: %clang -ansi -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-ANSI %s
// CHECK-LD-SPARC32-ANSI: values-Xc.o
@@ -13,7 +12,6 @@
// RUN: %clang -std=c89 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-C89 %s
// CHECK-LD-SPARC32-C89: values-Xc.o
@@ -21,7 +19,6 @@
// RUN: %clang -std=c90 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-C90 %s
// CHECK-LD-SPARC32-C90: values-Xc.o
@@ -29,7 +26,6 @@
// RUN: %clang -std=iso9899:199409 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-C94 %s
// CHECK-LD-SPARC32-C94: values-Xc.o
@@ -37,7 +33,6 @@
// RUN: %clang -std=c11 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-C11 %s
// CHECK-LD-SPARC32-C11: values-Xc.o
@@ -45,7 +40,6 @@
// RUN: %clang -std=gnu89 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-GNU89 %s
// CHECK-LD-SPARC32-GNU89: values-Xa.o
@@ -53,7 +47,6 @@
// RUN: %clang -std=gnu90 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-GNU90 %s
// CHECK-LD-SPARC32-GNU90: values-Xa.o
@@ -61,7 +54,6 @@
// RUN: %clang -std=gnu11 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-GNU11 %s
// CHECK-LD-SPARC32-GNU11: values-Xa.o
@@ -70,7 +62,6 @@
// Check i386-pc-solaris2.11, 32bit
// RUN: %clang -ansi -### %s 2>&1 \
// RUN: --target=i386-pc-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X32-ANSI %s
// CHECK-LD-X32-ANSI: values-Xc.o
diff --git a/clang/test/Driver/solaris-ld-values.cpp b/clang/test/Driver/solaris-ld-values.cpp
index 4230fabffcbbc6..566252f551d513 100644
--- a/clang/test/Driver/solaris-ld-values.cpp
+++ b/clang/test/Driver/solaris-ld-values.cpp
@@ -5,7 +5,6 @@
// Check sparc-sun-solaris2.11, 32bit
// RUN: %clang -ansi -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-ANSI %s
// CHECK-LD-SPARC32-ANSI: values-Xc.o
@@ -13,7 +12,6 @@
// RUN: %clang -std=c++98 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-CPP98 %s
// CHECK-LD-SPARC32-CPP98: values-Xc.o
@@ -21,7 +19,6 @@
// RUN: %clang -std=c++11 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-CPP11 %s
// CHECK-LD-SPARC32-CPP11: values-Xc.o
@@ -29,7 +26,6 @@
// RUN: %clang -std=gnu++98 -### %s 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC32-GNUPP98 %s
// CHECK-LD-SPARC32-GNUPP98: values-Xa.o
@@ -38,7 +34,6 @@
// Check i386-pc-solaris2.11, 32bit
// RUN: %clang -ANSI -### %s 2>&1 \
// RUN: --target=i386-pc-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X32-ANSI %s
// CHECK-LD-X32-ANSI: values-Xa.o
diff --git a/clang/test/Driver/solaris-ld.c b/clang/test/Driver/solaris-ld.c
index df4fa7b4c9ebd6..6d74389e89222c 100644
--- a/clang/test/Driver/solaris-ld.c
+++ b/clang/test/Driver/solaris-ld.c
@@ -3,11 +3,9 @@
// Check sparc-sun-solaris2.11, 32bit
// RUN: %clang -### %s --target=sparc-sun-solaris2.11 -fuse-ld= \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefixes=CHECK-LD-SPARC32,CHECK-LD %s
// RUN: %clang -### %s --target=sparc-sun-solaris2.11 -fuse-ld=gld \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefixes=CHECK-LD-SPARC32,CHECK-GLD %s
// CHECK-LD-SPARC32-NOT: warning:
@@ -31,7 +29,6 @@
// Check sparc-sun-solaris2.11, 64bit
// RUN: %clang -m64 -### %s 2>&1 --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-SPARC64 %s
// CHECK-LD-SPARC64-NOT: warning:
@@ -53,7 +50,6 @@
// Check i386-pc-solaris2.11, 32bit
// RUN: %clang -### %s 2>&1 --target=i386-pc-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X32 %s
// CHECK-LD-X32-NOT: warning:
@@ -76,7 +72,6 @@
// Check i386-pc-solaris2.11, 64bit
// RUN: %clang -m64 -### %s 2>&1 \
// RUN: --target=i386-pc-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree \
// RUN: | FileCheck --check-prefix=CHECK-LD-X64 %s
// CHECK-LD-X64-NOT: warning:
@@ -99,7 +94,6 @@
// Check the right -l flags are present with -shared
// RUN: %clang -### %s -shared 2>&1 \
// RUN: --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree \
// RUN: | FileCheck --check-prefix=CHECK-SPARC32-SHARED %s
// CHECK-SPARC32-SHARED: "{{.*}}ld{{(.exe)?}}"
@@ -109,61 +103,51 @@
// Check that libm is only linked with clang++.
// RUN: %clang -### %s --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOLIBM %s
// RUN: %clang -### %s -shared --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOLIBM %s
// RUN: %clangxx -### %s --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LIBM %s
// RUN: %clangxx -### %s -shared --target=sparc-sun-solaris2.11 \
-// RUN: --gcc-toolchain="" --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
+// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LIBM %s
// CHECK-LIBM: "-lm"
// CHECK-NOLIBM-NOT: "-lm"
// Check the right ld flags are present with -pie.
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -pie -fuse-ld= \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PIE-LD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -pie -fuse-ld=gld \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PIE-GLD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -no-pie -fuse-ld= \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-LD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -no-pie -fuse-ld=gld \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-GLD %s
// Check that -shared/-r/-static disable PIE.
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -shared -pie -fuse-ld= \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-LD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -shared -pie -fuse-ld=gld \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-GLD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -r -pie -fuse-ld= \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-LD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -r -pie -fuse-ld=gld \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-GLD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -static -pie -fuse-ld= \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-LD %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -static -pie -fuse-ld=gld \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOPIE-GLD %s
@@ -184,19 +168,15 @@
// Check that crt{begin,end}S.o is linked with -shared/-pie.
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTS %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -shared \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTS %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -no-pie \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTS %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -pie \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTS %s
// CHECK-CRTS: crtbeginS.o
@@ -208,11 +188,9 @@
// Check sparc-sun-solaris2.11, 32bit
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH-SPARC32 %s
// RUN: %clang --target=sparc-sun-solaris2.11 -### %s -ffast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH-SPARC32 %s
// CHECK-CRTFASTMATH-SPARC32: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -221,11 +199,9 @@
// Check sparc-pc-solaris2.11, 64bit
// RUN: %clang -m64 --target=sparc-sun-solaris2.11 -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH-SPARC64 %s
// RUN: %clang -m64 --target=sparc-sun-solaris2.11 -### %s -ffast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_sparc_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH-SPARC64 %s
// CHECK-CRTFASTMATH-SPARC64: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -234,11 +210,9 @@
// Check i386-pc-solaris2.11, 32bit
// RUN: %clang --target=i386-pc-solaris2.11 -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH-X32 %s
// RUN: %clang --target=i386-pc-solaris2.11 -### %s -ffast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH-X32 %s
// CHECK-CRTFASTMATH-X32: "-isysroot" "[[SYSROOT:[^"]+]]"
@@ -247,11 +221,9 @@
// Check i386-pc-solaris2.11, 64bit
// RUN: %clang -m64 --target=i386-pc-solaris2.11 -### %s \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH-X64 %s
// RUN: %clang -m64 --target=i386-pc-solaris2.11 -### %s -ffast-math \
-// RUN: --gcc-toolchain="" \
// RUN: --sysroot=%S/Inputs/solaris_x86_tree 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH-X64 %s
// CHECK-CRTFASTMATH-X64: "-isysroot" "[[SYSROOT:[^"]+]]"
More information about the cfe-commits
mailing list