Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.

Commit 0a6947d

Browse files
authored
[SoupChef] Fix build with Xcode 12.2 (#409)
Xcode 12.2 - adds `arm64` to the simulator architectures - removes `i386` from the simulator architectures `lipo` cannot create a _classic_ fat archive with `arm64` simulator and `arm64` device slices - since they are the same architecture. This requires `.xcframework` support which is not yet supported by XI and XM. However we can tweak the build to do: - x86_64 only for simulator, which is the only support arch for XI today - arm64 for devices and that makes `lipo` happy and we can continue to have this sample under test automation. Note: the original `.a` names were incorrect as they did not match the architectures that were present in the files. I changed them to mention the platform.
1 parent 73d7d0c commit 0a6947d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ios12/SoupChef/OrderSoupIntentStaticLib/Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ TARGET=OrderSoupIntentStaticLib
55

66
all: bind
77

8-
lib$(TARGET)-i386.a:
8+
lib$(TARGET)-simulator.a:
99
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphonesimulator -configuration Release clean build
1010
-mv $(PROJECT_ROOT)/build/Release-iphonesimulator/lib$(TARGET).a $@
1111

12-
lib$(TARGET)-arm64.a:
12+
lib$(TARGET)-device.a:
1313
$(XBUILD) -project $(PROJECT) -target $(TARGET) -sdk iphoneos -arch arm64 -configuration Release clean build
1414
-mv $(PROJECT_ROOT)/build/Release-iphoneos/lib$(TARGET).a $@
1515

16-
lib$(TARGET).a: lib$(TARGET)-i386.a lib$(TARGET)-arm64.a
16+
lib$(TARGET).a: lib$(TARGET)-simulator.a lib$(TARGET)-device.a
1717
xcrun -sdk iphoneos lipo -create -output $@ $^
1818

1919
bind: lib$(TARGET).a

ios12/SoupChef/OrderSoupIntentStaticLib/OrderSoupIntentStaticLib.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@
258258
730228B6210A498000D68C70 /* Debug */ = {
259259
isa = XCBuildConfiguration;
260260
buildSettings = {
261+
ARCHS = x86_64;
261262
CODE_SIGN_STYLE = Automatic;
262263
DEVELOPMENT_TEAM = 9VWFS9Q2KQ;
263264
OTHER_LDFLAGS = "-ObjC";
@@ -270,6 +271,7 @@
270271
730228B7210A498000D68C70 /* Release */ = {
271272
isa = XCBuildConfiguration;
272273
buildSettings = {
274+
ARCHS = x86_64;
273275
CODE_SIGN_STYLE = Automatic;
274276
DEVELOPMENT_TEAM = 9VWFS9Q2KQ;
275277
OTHER_LDFLAGS = "-ObjC";

0 commit comments

Comments
 (0)