summaryrefslogtreecommitdiffstats
path: root/lib/Driver/ToolChains/Gnu.cpp
diff options
context:
space:
mode:
authorJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2017-03-08 12:06:44 +0000
committerJonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>2017-03-08 12:06:44 +0000
commit8e67276e923bb759eb94f623c2529a6ca266e942 (patch)
tree85c62124ce062100d387eddbe9251e8145041882 /lib/Driver/ToolChains/Gnu.cpp
parent98183555eb52a2527e1e2b1952d493a5fc25085e (diff)
[XRay] Use AddCXXStdlibLibArgs. NFCI.
This function already does the very same thing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains/Gnu.cpp')
-rw-r--r--lib/Driver/ToolChains/Gnu.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index 6425850cd8..fe3c0191bb 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
@@ -347,10 +347,9 @@ static void linkXRayRuntimeDeps(const ToolChain &TC, const ArgList &Args,
CmdArgs.push_back("-lrt");
CmdArgs.push_back("-lm");
CmdArgs.push_back("-latomic");
- if (TC.GetCXXStdlibType(Args) == ToolChain::CST_Libcxx)
- CmdArgs.push_back("-lc++");
- else
- CmdArgs.push_back("-lstdc++");
+
+ TC.AddCXXStdlibLibArgs(Args, CmdArgs);
+
if (TC.getTriple().getOS() != llvm::Triple::FreeBSD)
CmdArgs.push_back("-ldl");
}