[PATCH] -iframework option should be forwarded to linker
Steven Wu
stevenwu at apple.com
Tue Feb 3 13:23:06 PST 2015
Hi David
Sorry I dropped you from the previous update. Does the updated patch look ok now?
Thanks
Steven
> On Jan 21, 2015, at 12:50 PM, Steven Wu <stevenwu at apple.com> wrote:
>
> - Format fix
>
> The extra braces are bad so I get rid of them. The range loop doesn't make thing better because of the long variable names. I happily switch to auto but keep my original loop structure.
>
>
> http://reviews.llvm.org/D7106 <http://reviews.llvm.org/D7106>
>
> Files:
> lib/Driver/Tools.cpp
> test/Driver/darwin-ld.c
>
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -5964,6 +5964,12 @@
> 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 =
> Index: test/Driver/darwin-ld.c
> ===================================================================
> --- test/Driver/darwin-ld.c
> +++ test/Driver/darwin-ld.c
> @@ -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"
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
> <D7106.18548.patch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150203/b14779fa/attachment.html>
More information about the cfe-commits
mailing list