forked from OSchip/llvm-project
-iframework option should be forwarded to linker
Summary: -iframework option is used to specified System framework path so the path specified should be passed to linker as -F option rdar://problem/18234544 Reviewers: bob.wilson Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7106 llvm-svn: 228413
This commit is contained in:
parent
1a0ec0f15d
commit
3ffb61b4ae
|
@ -6106,6 +6106,12 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
Args.AddAllArgs(CmdArgs, options::OPT_T_Group);
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_F);
|
||||
|
||||
// -iframework should be forwarded as -F.
|
||||
for (auto it = Args.filtered_begin(options::OPT_iframework),
|
||||
ie = Args.filtered_end(); it != ie; ++it)
|
||||
CmdArgs.push_back(Args.MakeArgString(std::string("-F") +
|
||||
(*it)->getValue()));
|
||||
|
||||
const char *Exec =
|
||||
Args.MakeArgString(getToolChain().GetLinkerPath());
|
||||
std::unique_ptr<Command> Cmd =
|
||||
|
|
|
@ -204,3 +204,9 @@
|
|||
// RUN: FileCheck -check-prefix=LINK_IOS_SIMULATOR_VERSION_MIN %s < %t.log
|
||||
// LINK_IPHONEOS_VERSION_MIN: -iphoneos_version_min
|
||||
// LINK_IOS_SIMULATOR_VERSION_MIN: -ios_simulator_version_min
|
||||
|
||||
// Check -iframework gets forward to ld as -F
|
||||
// RUN: %clang -target x86_64-apple-darwin %s -iframework Bar -framework Foo -### 2>&1 | \
|
||||
// RUN: FileCheck --check-prefix=LINK-IFRAMEWORK %s
|
||||
// LINK-IFRAMEWORK: {{ld(.exe)?"}}
|
||||
// LINK-IFRAMEWORK: "-FBar"
|
||||
|
|
Loading…
Reference in New Issue