[PATCH] Imply linker arguments from '-fveclib' option.
Michael Zolotukhin
mzolotukhin at apple.com
Mon Mar 16 13:05:32 PDT 2015
Hi hfinkel,
As discussed in D8097, we should provide corresponding linking flags when 'fveclib' is specified.
http://reviews.llvm.org/D8362
Files:
lib/Driver/Tools.cpp
test/Driver/fveclib.c
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -6124,6 +6124,13 @@
CmdArgs.push_back(Args.MakeArgString(std::string("-F") +
(*it)->getValue()));
+ if (Arg *A = Args.getLastArg(options::OPT_fveclib)) {
+ if (A->getValue() == StringRef("Accelerate")) {
+ CmdArgs.push_back("-framework");
+ CmdArgs.push_back("Accelerate");
+ }
+ }
+
const char *Exec =
Args.MakeArgString(getToolChain().GetLinkerPath());
std::unique_ptr<Command> Cmd =
Index: test/Driver/fveclib.c
===================================================================
--- test/Driver/fveclib.c
+++ test/Driver/fveclib.c
@@ -6,3 +6,6 @@
// CHECK-ACCELERATE: "-fveclib=Accelerate"
// CHECK-INVALID: error: invalid value 'something' in '-fveclib=something'
+
+// RUN: %clang -fveclib=Accelerate %s -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK %s
+// CHECK-LINK: "-framework" "Accelerate"
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8362.22048.patch
Type: text/x-patch
Size: 1063 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150316/011bd1e4/attachment.bin>
More information about the cfe-commits
mailing list