I'm having problems building the compiler from the master branch. I started running ./swift/utils/update-checkout --clone-with-ssh, which worked fine. Then tried building using
I'm running into the same exact problem. I've also tried re-building from step one (deleting everything and starting over). I'm also on a 15inch MBP mid 2015, but MacOS 10.14.5.
I suspect this may be an issue with LLVM. I also tried building with xcodebuild and overriding the architecture but, that just deferred a similar linking error.
This is a terrible hack and only partially works but if you only need to generate the xcode project you can:
Run build-script -x to start building. It will fail.
Go into llvm-macosx-x86_64 and run xcodebuild build -arch "x86_64" VALID_ARCHS="i368 x86_64 x86_64h". This will also fail with the message libtool: no library created (no object files in input files matching -arch_only x86_64). Above the error is the command it ran (something like /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64...libclang_rt.builtins_x86_64h_osx.a).
Run that command again but change -arch_only x86_64 to -arch_only x86_64h.
Run build-script -x --skip-build-llvm
You will run into linker errors but you can at least use xcode to edit/debug the project.
=== BUILD TARGET clang_rt.builtins_i386_osx OF PROJECT LLVM WITH CONFIGURATION RelWithDebInfo ===
Check dependencies
error: The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture.
** BUILD FAILED **
The following build commands failed:
Check dependencies
Instead, if I try build checkout out the tag swift-DEVELOPMENT-SNAPSHOT-2019-11-20-a, that seems to work. You can do that using
Yep. That's pretty close to what master is at (which is giving trouble); that's why I recommended switching to a slightly older "known good" tag so you can get your tasks done without getting blocked.
It would be great to get this resolved on master. I spent a bit of time trying to fix it, but I don't know enough about the build system. @xiaodai any ideas?