Xcodebuild does not generate x86_64 binary

I have a strange problem while trying to compile a static library using xcodebuild. Project configuration: ARCHS = $ (ARCHS_STANDARD) VALID_ARCHS = $ ARCHS It was implemented using Xcode 5.1.1.

Now the strange part comes in - a project built on machines connected to Jenkins produces a live library with all 5 architectures (armv7 armv7s arm64, i386, x86_64), but when the assembly runs on my (64-bit) Mac, I get only four - x86_64 is missing. Without changing the code, a clean repo, exactly the same build procedure.

I wonder what could be causing this difference. I suppose it could be some kind of environment setup on my side, but I have no idea what it could be. The configuration of the project is not under suspicion - it creates the correct fat library on another machine.

I would be grateful for your advice.

EDIT: Error not thrown. xcodebuild behaves exactly like this architecture is not specified - it compiles the iphonesimulator assembly for i386 only. It is also worth noting - Xcode creates all architectures, only xcodebuild made from the command line has problems.

+5
source share
1 answer

Try adding the -destination flag to the xcodebuild command.

xcodebuild -workspace MyWorkspace.xcworkspace -scheme MyScheme -destination 'platform=OS X,arch=x86_64' test 

The above example is on the xcodebuild help page .

I had a similar problem when I wanted xcodebuild to create an i386 build for the simulator and continue to build Armv7 until I added this flag to my team.

0
source

Source: https://habr.com/ru/post/1202966/


All Articles