Xcode7 Cannot build for armv7s

Did Xcode7 drop support for the armv7s architecture? I get the following error when trying to compile a static library that includes the armv7s architecture (using xcodebuild).


While building module 'UIKit' imported from /Users/Mike/help-center-sdk/SupportKit/SupportKit/Views/SKTInAppNotificationView.h:9:
While building module 'Darwin' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:
In file included from <module-includes>:1:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
#error Unsupported architecture
^
While building module 'UIKit' imported from /Users/Mike/help-center-sdk/SupportKit/SupportKit/Views/SKTInAppNotificationView.h:9:
While building module 'Darwin' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIKitDefines.h:8:
In file included from <module-includes>:3:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/copyfile.h:36:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/include/stdint.h:63:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/stdint.h:52:
In file included from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/sys/_types.h:33:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
#error architecture not supported
^


...

We are targeting iOS 7.0, and the build setting is as follows


ARCHS = (
"$(ARCHS_STANDARD)",
armv7s,
);


If I remove the armv7s line, it compiles correctly, however the produced binary of course does not include the armv7s slice. The same project is able to compile correctly on Xcode 6.


What is the impact of removing the armv7s slice from our compiled library? Is armv7s still a supported architecture in iOS9, and will our integrators have compile errors if they target armv7s (iOS 7 or 8) and the slice is missing from our library?

Accepted Reply

The build log snippet shows the target being built against the Simulator SDK. The simulator SDK only supports i386 and x86_64. ARCHS is one of the build settings that can be specified on a per-SDK basis, so if you want to customize it you may try doing so for “Any iOS SDK” rather than for all SDKs.

Replies

Sounds like your project-level archi settings are conflicted to me.

Not sure I get what you mean? I have Architectures configured as


$(ARCHS_STANDARD)
armv7s


And valid architectures is


arm64
armv7
armv7s
x86_64
i386


Where else could there be a conflict?

The build log snippet shows the target being built against the Simulator SDK. The simulator SDK only supports i386 and x86_64. ARCHS is one of the build settings that can be specified on a per-SDK basis, so if you want to customize it you may try doing so for “Any iOS SDK” rather than for all SDKs.

Got it, thanks a lot!

May I know how exactly did you fix the issue ? Thanks a lot!