Stop re-exporting the Objective-C library

and link it properly. This is needed to embed LLVM bitcode sections
in the standard library and overlays. The linker doesn't support
embedded bitcode and reexport flags (among others).

rdar://problem/20750099

Swift SVN r28052
This commit is contained in:
David Farler
2015-05-01 22:24:14 +00:00
parent acba19a494
commit 91c64fdbb1
6 changed files with 24 additions and 6 deletions

View File

@@ -709,6 +709,7 @@ Job *darwin::Linker::constructJob(const JobAction &JA,
Arguments.push_back(Args.MakeArgString(OI.SDKPath));
}
Arguments.push_back("-lobjc");
Arguments.push_back("-lSystem");
StringRef ArchName = TC.getDarwinArchName(Args);
@@ -756,8 +757,6 @@ Job *darwin::Linker::constructJob(const JobAction &JA,
Arguments.push_back(Args.MakeArgString(LibProfile));
}
// FIXME: We probably shouldn't be adding an rpath here unless we know ahead
// of time the standard library won't be copied.
Arguments.push_back("-rpath");