File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,14 @@ BUILD_DIR = $(CURDIR)/build
77# Serialize agent-triggered Xcode builds through one shared DerivedData cache.
88XCODEBUILD_LOCK = $(BUILD_DIR ) /.xcodebuild.lock
99XCODEBUILD = tools/with_xcodebuild_lock.sh $(XCODEBUILD_LOCK ) xcodebuild
10+ # 强制 universal binary:不指定 destination 时 xcodebuild 会从 {arm64, x86_64, Any Mac}
11+ # 中挑第一条(host arch),其 arch 字段反过来覆盖 ARCHS,把 build 约束成单一架构。
12+ # generic/platform=macOS 是「不绑定具体架构」的 destination,不会触发这种 override,
13+ # ARCHS 按项目自身配置生效(macOS SDK 的 ARCHS_STANDARD 恰好同时包含 arm64 与 x86_64)。
14+ #
15+ # 仅在 release target 启用(用于分发/跨架构部署测试)。日常 build / make install
16+ # 不带此 flag,保持 host-arch only 的快速迭代体验。
17+ XCDEST = -destination 'generic/platform=macOS'
1018APP_NAME = Linguist Zixia Input.app
1119INSTALL_DIR = $(HOME ) /Library/Input Methods
1220QUIET_FLAG = $(if $(V ) ,,-quiet)
@@ -81,7 +89,7 @@ dict-release: ## 重新生成 production zh_dict
8189
8290release : $(DICT_DB ) unbundle-alt-dicts # # 构建 Release 并注入 MARKETING_VERSION
8391 $(XCODEBUILD ) -project $(PROJECT ) -scheme $(SCHEME ) -configuration Release \
84- -derivedDataPath $(BUILD_DIR ) $(QUIET_FLAG ) $(XCFLAGS ) \
92+ $( XCDEST ) -derivedDataPath $(BUILD_DIR ) $(QUIET_FLAG ) $(XCFLAGS ) \
8593 MARKETING_VERSION=$(VERSION_NUMBER ) \
8694 build
8795
You can’t perform that action at this time.
0 commit comments