On Intel Macs Xcode show "Bad CPU type in executable" error when running the SPM plugin. See issue #213.
Analysis
The binary artifact in the latest release isn't a fat binary:
lipo -detailed_info ./bin/license-plist
input file ./bin/license-plist is not a fat file
Non-fat file: ./bin/license-plist is architecture: arm64
The root cause of the issue is spm_artifactbundle_macos command in Makefile. It inherits build command. But build command produces binaries only for the current architecture.
Solution
Use build_portable as a parent of spm_artifactbundle_macos command.
Description
On Intel Macs Xcode show "Bad CPU type in executable" error when running the SPM plugin. See issue #213.
Analysis
The binary artifact in the latest release isn't a fat binary:
The root cause of the issue is
spm_artifactbundle_macos
command inMakefile
. It inheritsbuild
command. Butbuild
command produces binaries only for the current architecture.Solution
Use
build_portable
as a parent ofspm_artifactbundle_macos
command.