diff options
author | Fangrui Song <i@maskray.me> | 2021-03-20 13:24:49 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-03-20 13:24:49 -0700 |
commit | f628ba0b55b117dc68f9cb3be58189c05910660c (patch) | |
tree | 09501bc4599c95e64b60f392d1103349ad618933 | |
parent | ee8b53815ddf6f6f94ade0068903cd5ae843fafa (diff) | |
download | llvm-f628ba0b55b117dc68f9cb3be58189c05910660c.zip llvm-f628ba0b55b117dc68f9cb3be58189c05910660c.tar.gz llvm-f628ba0b55b117dc68f9cb3be58189c05910660c.tar.bz2 |
[test] Fix Driver/gcc-toolchain.cpp if CLANG_DEFAULT_RTLIB is compiler-rt
-rw-r--r-- | clang/test/Driver/gcc-toolchain.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/Driver/gcc-toolchain.cpp b/clang/test/Driver/gcc-toolchain.cpp index 8bb391f..4bd6583 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. |