summaryrefslogtreecommitdiff
path: root/lib/Driver
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
commit04e326b3d0ae1a84643b7366ce0ea5137e06ed69 (patch)
tree73c1a26eda55653080762f0278458fc2cc65e7f8 /lib/Driver
parent89deb3f041a1aa2e302b8cd778095ad2cac5e4d7 (diff)
downloadclang-04e326b3d0ae1a84643b7366ce0ea5137e06ed69.tar.gz
Add the Objective-C runtime linking arguments after user-specified
linker arguments. Fixes <rdar://problem/11417441>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver')
-rw-r--r--lib/Driver/Tools.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index bed29abd82..887c64cff0 100644
--- a/lib/Driver/Tools.cpp
+++ b/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");