-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.sh
More file actions
34 lines (28 loc) · 1.52 KB
/
Copy pathenv.sh
File metadata and controls
34 lines (28 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# --- macOS targets ---
export MACOSX_DEPLOYMENT_TARGET=10.15
export OSX_VERSION_MIN="-mmacosx-version-min=${MACOSX_DEPLOYMENT_TARGET}"
export ARM64_TARGETS="-target arm64-apple-macos10.15 -arch arm64"
export X86_64_TARGETS="-target x86_64-apple-macos10.15 -arch x86_64"
#need ONE of these lines, default is to build for both arm64 and x86_64
export XL_TARGETS="${X86_64_TARGETS} ${ARM64_TARGETS}"
# export XL_TARGETS="${X86_64_TARGETS}"
# export XL_TARGETS="${ARM64_TARGETS}"
# need ONE of these
# export BUILD_HOST=x86_64
# export BUILD_HOST=arm
export BUILD_HOST=$( uname -p )
# --- iOS targets ---
export IOS_MIN_VERSION=26.0
export IOS_SDK=$(xcrun --sdk iphoneos --show-sdk-path)
export IOS_VERSION_MIN="-miphoneos-version-min=${IOS_MIN_VERSION}"
export IOS_ARM64_TARGETS="-target arm64-apple-ios${IOS_MIN_VERSION} -arch arm64 -isysroot ${IOS_SDK}"
# --- iOS Simulator targets (arm64 only — matches Apple Silicon host) ---
# The -simulator triple is distinct from the device triple even at the same
# arch, so device and simulator .a files cannot be lipo'd together. They must
# be built separately and installed into parallel lib-ios-sim/libdbg-ios-sim
# trees; xLights.xcodeproj selects between them with
# LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*].
export IOS_SIM_SDK=$(xcrun --sdk iphonesimulator --show-sdk-path)
export IOS_SIM_VERSION_MIN="-mios-simulator-version-min=${IOS_MIN_VERSION}"
export IOS_SIM_ARM64_TARGETS="-target arm64-apple-ios${IOS_MIN_VERSION}-simulator -arch arm64 -isysroot ${IOS_SIM_SDK}"
NUMCPUS=$(sysctl -n hw.ncpu)