Skip to content

Commit

Permalink
[Driver] Always fall back to an arclite in the Xcode default toolchain (
Browse files Browse the repository at this point in the history
#22911)

...instead of the current toolchain, which we would have just
searched by looking relative to the swiftc binary.

rdar://problem/48044350
  • Loading branch information
jrose-apple committed Feb 26, 2019
1 parent 86a9cc3 commit e76b5a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Driver/DarwinToolChains.cpp
Expand Up @@ -169,7 +169,9 @@ static bool findXcodeClangPath(llvm::SmallVectorImpl<char> &path) {

auto xcrunPath = llvm::sys::findProgramByName("xcrun");
if (!xcrunPath.getError()) {
const char *args[] = {"-f", "clang", nullptr};
// Explicitly ask for the default toolchain so that we don't find a Clang
// included with an open-source toolchain.
const char *args[] = {"-toolchain", "default", "-f", "clang", nullptr};
sys::TaskQueue queue;
queue.addTask(xcrunPath->c_str(), args, /*Env=*/llvm::None,
/*Context=*/nullptr,
Expand Down

0 comments on commit e76b5a8

Please sign in to comment.