-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1317 from wordpress-mobile/issue/1313_carthage_build
Fix Carthage build for Xcode 12
- Loading branch information
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
# carthage.sh | ||
# Usage example: ./carthage.sh build --platform iOS | ||
# This script was copied from here: https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323 | ||
|
||
set -euo pipefail | ||
|
||
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX) | ||
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT | ||
|
||
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise | ||
# the build will fail on lipo due to duplicate architectures. | ||
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig | ||
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig | ||
|
||
export XCODE_XCCONFIG_FILE="$xcconfig" | ||
carthage "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters