summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-05-22 21:13:30 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-05-22 21:13:30 +0000
commit9cd6c51cd87f4e1f374287ed07fb00ba98a83118 (patch)
treead001016e9d99d6957e9506d3b5c7d3a8b2e7612
parent66936e192ccd1c61dd706fb57e267a483319569f (diff)
downloadclang-9cd6c51cd87f4e1f374287ed07fb00ba98a83118.tar.gz
clang-9cd6c51cd87f4e1f374287ed07fb00ba98a83118.tar.bz2
clang-9cd6c51cd87f4e1f374287ed07fb00ba98a83118.tar.xz
Unify the name of compiler-rt builtins library on Linux.
Call it "libclang_rt.builtins-<arch>.a" to be consistent with sanitizers/profile libraries naming. Modify Makefile and CMake build systems and Clang driver accordingly. Fixes PR19822. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209474 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Driver/Tools.cpp7
-rw-r--r--runtime/compiler-rt/Makefile4
-rw-r--r--test/Driver/linux-ld.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e51cb1b279..3fe552db82 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1891,14 +1891,15 @@ static SmallString<128> getCompilerRTLibDir(const ToolChain &TC) {
return Res;
}
-// This adds the static libclang_rt.arch.a directly to the command line
+// This adds the static libclang_rt.builtins-arch.a directly to the command line
// FIXME: Make sure we can also emit shared objects if they're requested
// and available, check for possible errors, etc.
static void addClangRTLinux(
const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) {
SmallString<128> LibClangRT = getCompilerRTLibDir(TC);
- llvm::sys::path::append(LibClangRT,
- Twine("libclang_rt.") + getArchNameForCompilerRTLib(TC) + ".a");
+ llvm::sys::path::append(LibClangRT, Twine("libclang_rt.builtins-") +
+ getArchNameForCompilerRTLib(TC) +
+ ".a");
CmdArgs.push_back(Args.MakeArgString(LibClangRT));
CmdArgs.push_back("-lgcc_s");
diff --git a/runtime/compiler-rt/Makefile b/runtime/compiler-rt/Makefile
index 9833eb901a..ccd83a3570 100644
--- a/runtime/compiler-rt/Makefile
+++ b/runtime/compiler-rt/Makefile
@@ -126,7 +126,7 @@ TryCompile = \
# We try to build 32-bit runtimes both on 32-bit hosts and 64-bit hosts.
Runtime32BitConfigs = \
- full-i386.a profile-i386.a san-i386.a asan-i386.a asan_cxx-i386.a \
+ builtins-i386.a profile-i386.a san-i386.a asan-i386.a asan_cxx-i386.a \
ubsan-i386.a ubsan_cxx-i386.a
# We currently only try to generate runtime libraries on x86.
@@ -136,7 +136,7 @@ endif
ifeq ($(ARCH),x86_64)
RuntimeLibrary.linux.Configs += \
- full-x86_64.a profile-x86_64.a san-x86_64.a asan-x86_64.a \
+ builtins-x86_64.a profile-x86_64.a san-x86_64.a asan-x86_64.a \
asan_cxx-x86_64.a tsan-x86_64.a msan-x86_64.a ubsan-x86_64.a \
ubsan_cxx-x86_64.a dfsan-x86_64.a lsan-x86_64.a
# We need to build 32-bit ASan/UBsan libraries on 64-bit platform, and add them
diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
index 4036635847..5509e53419 100644
--- a/test/Driver/linux-ld.c
+++ b/test/Driver/linux-ld.c
@@ -49,9 +49,9 @@
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
// CHECK-LD-RT: "-L[[SYSROOT]]/lib"
// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib"
-// CHECK-LD-RT: libclang_rt.x86_64.a" "-lgcc_s"
+// CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s"
// CHECK-LD-RT: "-lc"
-// CHECK-LD-RT: libclang_rt.x86_64.a" "-lgcc_s"
+// CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s"
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=x86_64-unknown-linux \