5
votes

I have a strange issue when trying to compile a static library using xcodebuild. Project's configuration is: ARCHS = $(ARCHS_STANDARD) VALID_ARCHS = $ARCHS It's executed using Xcode 5.1.1.

Now comes the weird part - the project built on machines connected to Jenkins produces fat libary with all 5 architectures (armv7 armv7s arm64, i386, x86_64), but when a build is launched on my (64bit) Mac I'm getting only four - x86_64 is missing. No code change, clean repo, exactly the same build routine.

I wonder what may be causing that difference. I guess it might be some kind of an environment setup on my side, but have no idea what it might be. Project configuration is not under suspicion - it creates proper fat library on a different machine.

I'd be thankful for your advices.

EDIT: No error is thrown either. xcodebuild behaves just like that architecture is not specified - compiles iphonesimulator build just for i386. Also worth noticing - Xcode creates all architectures, only xcodebuild executed from command line has issues.

1

1 Answers

0
votes

Try adding the -destination flag to your xcodebuild command.

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

The above is an example from the xcodebuild manual page.

I had a similar issue where I wanted xcodebuild to make an i386 build for simulator and continued to create Armv7 until I added that flag to my command.