[clang] f628ba0 - [test] Fix Driver/gcc-toolchain.cpp if CLANG_DEFAULT_RTLIB is compiler-rt
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 20 13:24:55 PDT 2021
Author: Fangrui Song
Date: 2021-03-20T13:24:49-07:00
New Revision: f628ba0b55b117dc68f9cb3be58189c05910660c
URL: https://github.com/llvm/llvm-project/commit/f628ba0b55b117dc68f9cb3be58189c05910660c
DIFF: https://github.com/llvm/llvm-project/commit/f628ba0b55b117dc68f9cb3be58189c05910660c.diff
LOG: [test] Fix Driver/gcc-toolchain.cpp if CLANG_DEFAULT_RTLIB is compiler-rt
Added:
Modified:
clang/test/Driver/gcc-toolchain.cpp
Removed:
################################################################################
diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp
index 8bb391f19eac..4bd658315a44 100644
--- a/clang/test/Driver/gcc-toolchain.cpp
+++ b/clang/test/Driver/gcc-toolchain.cpp
@@ -1,12 +1,14 @@
// Test that gcc-toolchain option is working correctly
//
+/// Without --rtlib=libgcc the driver may pick clang_rt.crtbegin.o if
+/// -DCLANG_DEFAULT_RTLIB=compiler-rt.
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t --target=x86_64-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ 2>&1 | \
+// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc 2>&1 | \
// RUN: FileCheck %s
//
// Additionally check that the legacy spelling of the flag works.
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t --target=x86_64-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ 2>&1 | \
+// RUN: -gcc-toolchain %S/Inputs/ubuntu_14.04_multiarch_tree/usr -stdlib=libstdc++ --rtlib=libgcc 2>&1 | \
// RUN: FileCheck %s
//
// Test for header search toolchain detection.
More information about the cfe-commits
mailing list