Skip to content

Commit b2cdc73

Browse files
committed
Add shell script to workaround Xcode 12 issue
Carthage/Carthage#3019
1 parent 76ac2d3 commit b2cdc73

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "SnapKit/SnapKit" "5.0.1"
2-
github "cbpowell/MarqueeLabel" "4.0.2"
2+
github "cbpowell/MarqueeLabel" "4.0.3"

carthage.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env bash
2+
3+
# carthage.sh
4+
# Usage example: ./carthage.sh build --platform iOS
5+
6+
set -euo pipefail
7+
8+
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
9+
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
10+
11+
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
12+
# the build will fail on lipo due to duplicate architectures.
13+
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig
14+
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
15+
16+
export XCODE_XCCONFIG_FILE="$xcconfig"
17+
carthage "$@"

0 commit comments

Comments
 (0)