Hi, I've got a similar problem to one described here: Build failure on Apple Silicon M1 Mac Mini.
I tried everything what was described in this thread. I'm running the following command from the Terminal which is not running under Rosetta:
utils/build-script --skip-build-benchmarks \
--skip-ios --skip-watchos --skip-tvos --swift-darwin-supported-archs "$(uname -m)" \
--sccache --release-debuginfo --swift-disable-dead-stripping --test \
--xcode
uname -m
returns arm64 and so does platform.machine()
when I run python. I also tried running Xcode 12.3 with Rosetta enabled and disabled. Still no luck.
That's an error message:
error: /Applications/Xcode_12_3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no library created (no object files in input files matching -arch_only x86_64)
Last couple of lines from the terminal:
Libtool /path/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/stdlib/public/LLVMSupport/Swift.build/RelWithDebInfo/swiftLLVMSupport-macosx-arm64.build/libswiftLLVMSupport-macosx-arm64.a normal (in target 'swiftLLVMSupport-macosx-arm64' from project 'Swift')
cd /path/swift
/Applications/Xcode_12_3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only x86_64 -D -syslibroot /Applications/Xcode_12_3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -L/path/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/stdlib/public/LLVMSupport/Swift.build/RelWithDebInfo/swiftLLVMSupport-macosx-arm64.build -filelist /path/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/stdlib/public/LLVMSupport/Swift.build/RelWithDebInfo/swiftLLVMSupport-macosx-arm64.build/Objects-normal/x86_64/swiftLLVMSupport-macosx-arm64.LinkFileList -dependency_info /path/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/stdlib/public/LLVMSupport/Swift.build/RelWithDebInfo/swiftLLVMSupport-macosx-arm64.build/Objects-normal/x86_64/swiftLLVMSupport-macosx-arm64_libtool_dependency_info.dat -o /path/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/stdlib/public/LLVMSupport/Swift.build/RelWithDebInfo/swiftLLVMSupport-macosx-arm64.build/libswiftLLVMSupport-macosx-arm64.a
error: /Applications/Xcode_12_3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: no library created (no object files in input files matching -arch_only x86_64)
Command Libtool failed with a nonzero exit code
** BUILD FAILED **
The following build commands failed:
Libtool /path/build/Xcode-RelWithDebInfoAssert/swift-macosx-arm64/stdlib/public/LLVMSupport/Swift.build/RelWithDebInfo/swiftLLVMSupport-macosx-arm64.build/libswiftLLVMSupport-macosx-arm64.a normal
(1 failure)
ERROR: command terminated with a non-zero exit status 65, aborting