summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-05-15 21:00:27 +0000
committerDouglas Gregor <dgregor@apple.com>2012-05-15 21:00:27 +0000
commit9295df056971230934aaed55f5a5d3b65c47e952 (patch)
treebde334b810e3879c3c5ebc11375593dedf7ea0be /clang/lib/Driver/Tools.cpp
parenta548587d484c51d7616dbe86f62a546eca16b822 (diff)
downloadbcm5719-llvm-9295df056971230934aaed55f5a5d3b65c47e952.tar.gz
bcm5719-llvm-9295df056971230934aaed55f5a5d3b65c47e952.zip
Add the Objective-C runtime linking arguments after user-specified
linker arguments. Fixes <rdar://problem/11417441>. llvm-svn: 156853
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index bed29abd82c..887c64cff03 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4224,6 +4224,8 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
// This is more complicated in gcc...
CmdArgs.push_back("-lgomp");
+ AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
+
if (isObjCRuntimeLinked(Args) &&
!Args.hasArg(options::OPT_nostdlib) &&
!Args.hasArg(options::OPT_nodefaultlibs)) {
@@ -4246,8 +4248,6 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back("-lobjc");
}
- AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
-
if (LinkingOutput) {
CmdArgs.push_back("-arch_multiple");
CmdArgs.push_back("-final_output");
OpenPOWER on IntegriCloud