Re-apply "Driver: Make profiling flags work with -nostdlib on Darwin"
This time without a stray "true" in an argument list.
This reverts r237077, restoring r237074.
llvm-svn: 237091
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index e215b6e..c1b5158 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -6328,6 +6328,11 @@
if (Args.hasArg(options::OPT_fnested_functions))
CmdArgs.push_back("-allow_stack_execute");
+ // TODO: It would be nice to use addProfileRT() here, but darwin's compiler-rt
+ // paths are different enough from other toolchains that this needs a fair
+ // amount of refactoring done first.
+ getMachOToolChain().addProfileRTLibs(Args, CmdArgs);
+
if (!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nodefaultlibs)) {
if (getToolChain().getDriver().CCCIsCXX())