summaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-10-20 12:34:18 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-10-20 12:34:18 +0000
commitacca8bcbe7b4c765caee75e62bfbf47f968a7bac (patch)
treed214a3f199224bae8d6d20fe49993666ab8111fb /lib/Driver/Tools.cpp
parentd29849e9ab180bbedfb69a58b24d0f7737850f7f (diff)
downloadclang-acca8bcbe7b4c765caee75e62bfbf47f968a7bac.tar.gz
clang-acca8bcbe7b4c765caee75e62bfbf47f968a7bac.tar.bz2
clang-acca8bcbe7b4c765caee75e62bfbf47f968a7bac.tar.xz
Driver: libubsan_cxx depends on libubsan. Preserve the topological ordering, some linkers depend on it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193048 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index c85ff8d60c..2ab8b00e17 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1779,13 +1779,14 @@ static void addLsanRTLinux(const ToolChain &TC, const ArgList &Args,
static void addUbsanRTLinux(const ToolChain &TC, const ArgList &Args,
ArgStringList &CmdArgs, bool IsCXX,
bool HasOtherSanitizerRt) {
- addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "ubsan", false, false);
-
// Only include the bits of the runtime which need a C++ ABI library if
// we're linking in C++ mode.
if (IsCXX)
addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "ubsan_cxx", false, false);
+ // Now insert the common ubsan bits. ubsan_cxx depends on them.
+ addSanitizerRTLinkFlagsLinux(TC, Args, CmdArgs, "ubsan", false, false);
+
// Need a copy of sanitizer_common. This could come from another sanitizer
// runtime; if we're not including one, include our own copy.
if (!HasOtherSanitizerRt)