Xcode build error

On the tensorflow branch, we recently encountered an Xcode build-script error after merging from master to swift-DEVELOPMENT-SNAPSHOT-2019-06-23-a:

$ ./swift/utils/build-script -x -R --debug-swift --skip-build-benchmarks --stdlib-deployment-targets=macosx-x86_64 --enable-tensorflow --reconfigure
...
ls: /Users/danielzheng/swift-build/build/Xcode-ReleaseAssert+swift-DebugAssert/llvm-macosx-x86_64/lib/clang: No such file or directory
./swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

I wonder if anyone's encountered the llvm-macosx-x86_64/lib/clang: No such file or directory error before?

It must be a recent regression, introduced since swift-DEVELOPMENT-SNAPSHOT-2019-06-17-a. I imagine the error is related to CMake/the build system.

@dan-zheng That looks like [SR-10998] Build-script error with --release-debuginfo --debug-swift --xcode · Issue #53388 · apple/swift · GitHub . There's a solution which involves a couple of temporary reverts in the comments. Ninja builds still work as well

1 Like

Thanks @owenv, the solution worked!
For reference: temporarily reverting the commit on tensorflow branch to unblock Xcode development.

Sorry for not catching this error. @jrose has put up a PR that should fix this issue: [build-script] Fix #25547 to handle Xcode-based builds by jrose-apple · Pull Request #25769 · apple/swift · GitHub.