From: Fangrui Song Date: Sat, 20 Mar 2021 20:24:49 +0000 (-0700) Subject: [test] Fix Driver/gcc-toolchain.cpp if CLANG_DEFAULT_RTLIB is compiler-rt X-Git-Tag: llvmorg-14-init~11799 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f628ba0b55b117dc68f9cb3be58189c05910660c;p=platform%2Fupstream%2Fllvm.git [test] Fix Driver/gcc-toolchain.cpp if CLANG_DEFAULT_RTLIB is compiler-rt --- 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.