I am trying to compile XZ Utils for iOS.
How I am running ./configure:
CC="clang -arch armv7 -arch armv7s -arch arm64 \
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk" \
./configure --disable-dependency-tracking \
--host=arm-apple-darwin15.0.0 --build=x86_64-apple-darwin15.3.0
It compiles fine if I only specify one architecture.
configure:6216: clang -arch armv7 -arch armv7s -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.2.sdk -E conftest.c
clang: error: cannot use 'cpp-output' output with multiple -arch options
I want fat binaies containing armv7, armv7s, and arm64 slices to be compiled. Is there any way to get around this limitation of clang
?
You can only use one architecture as a target, you have to use
lipo
to create the fat library.As an example: