Skip to content

Commit

Permalink
Revert "Remove Xcode 12 hack"
Browse files Browse the repository at this point in the history
This reverts commit ed4c58a.

As long as we ship a carthage archive we need that hack, otherwise it
will try to build for both simulator and hardware ARM, failing to merge them
together.
  • Loading branch information
badboy committed Dec 7, 2021
1 parent f520d78 commit 225c69d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/build-carthage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ FRAMEWORK_NAME="${1:-Glean}"
CONFIGURATION="${2:-Release}"

WORKSPACE_ROOT="$( cd "$(dirname "$0")/.." ; pwd -P )"
XCODE_XCCONFIG_FILE="$WORKSPACE_ROOT/xcconfig/xcode-12-fix-carthage-lipo.xcconfig"
export XCODE_XCCONFIG_FILE

set -o pipefail && \
carthage build --archive --platform iOS --cache-builds --verbose --configuration "${CONFIGURATION}" "${FRAMEWORK_NAME}" | \
Expand Down
6 changes: 6 additions & 0 deletions xcconfig/xcode-12-fix-carthage-lipo.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Carthage has an issue with XCode 12 architecture changes which doesn't allow
// it to compile dependencies for proper architecture. This works around it.
// Ref https://github.com/Carthage/Carthage/issues/3019
EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64=arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS=$(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT))
IPHONEOS_DEPLOYMENT_TARGET=11.4

0 comments on commit 225c69d

Please sign in to comment.