blob: d3a7d5a25dc6832c4c1b2e22f2cce18ab455796d [file] [log] [blame] [edit]
# This yaml file is used to package binaries from Xcode.app.
#
# To use this:
#
# 1. Make sure Xcode is fully updated (via the app store or otherwise).
#
# 2. Copy Xcode.app to the same directory as this file, naming it
# xcode_binaries. `cp -c` uses `clonefile` which is speedier and uses less
# disk space than making true copies, but requires source and destination
# to be on the same APFS filesystem. Remove the `-c` if clonefile failures
# are reported.
#
# % rm -rf build/xcode_binaries
# % cp -ac /Applications/Xcode.app/ build/xcode_binaries
#
# Xcode 26 has unbundled the Metal compiler, so download it and integrate
# it into the toolchain. This installs the Metal toolchain corresponding
# to Xcode’s version, finds the filesystem mount point where it appears,
# and splices it into build/xcode_binaries:
#
# % DEVELOPER_DIR=/Applications/Xcode.app \
# xcodebuild -downloadComponent MetalToolchain
# % METAL_DIR=$(xcrun --find metal |
# sed -E -e 's%(/Metal\.xctoolchain)/.*%\1%')
# % rsync --archive --delete ${METAL_DIR}/usr/metal/ \
# build/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal
# % rsync --archive ${METAL_DIR}/usr/bin/{air-lld,metal,metallib} \
# build/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
#
# 3. Create the package and upload it to CIPD:
#
# % cipd create --pkg-def build/xcode_binaries.yaml \
# -ref ${xcode_version} -ref ${xcode_build_version} \
# -ref sdk_${sdk_version} -ref sdk_${sdk_build_version}
#
# ${xcode_version} and ${xcode_build_version} can be found in "About
# Xcode", or by running `xcodebuild -version`. ${sdk_version} can be found
# by running `xcrun --show-sdk-version`. ${sdk_build_version} can be found
# by running `xcrun --show-sdk-build-version`.
#
# 4. Optional: clean up.
#
# % rm -rf build/xcode_binaries
#
# To deploy the newly created cipd package across the fleet, modify
# build/mac_toolchain.py to point to the new cipd hash, and update the
# mac_sdk_official_* variables in build/config/mac/mac_sdk.gni.
#
# Note that the Chromium build looks for the mac binaries in
# build/mac_files/xcode_binaries; it won't see the build/xcode_binaries that you
# just created. In order to use the new toolchain version, you still need to
# `gclient runhooks` after updating the hash in mac_toolchain.py.
#
# The ACLs for this package are determined by the directory structure. The
# nomenclature mirrors that of the hermetic toolchain to avoid ACL duplication.
package: infra_internal/ios/xcode/xcode_binaries/mac-amd64
description: A hermetic deployment of all Xcode binaries used to build Chromium.
root: "xcode_binaries"
data:
- dir: Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
- dir: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/bison/
- dir: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/air-lld
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bison
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gm4
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/gperf
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-nm
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-objdump
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-otool
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-size
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metallib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/mig
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/otool-classic
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size-classic
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libswiftDemangle.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libtapi.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/migcom
- file: Contents/Developer/usr/bin/atos
- file: Contents/Developer/usr/bin/notarytool
- file: Contents/Resources/LicenseInfo.plist
- file: Contents/Resources/en.lproj/License.rtf
- dir: Contents/SharedFrameworks/CoreSymbolicationDT.framework/
- dir: Contents/SharedFrameworks/DebugSymbolsDT.framework/
- dir: Contents/SharedFrameworks/MallocStackLoggingDT.framework/
- dir: Contents/SharedFrameworks/SymbolicationDT.framework/
- file: Contents/version.plist
# llvm-size and size are run on swarming, those are symlinked to out of
# isolated tree and produce invalid symlinks if we don't use copy mode here.
install_mode: copy