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 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"