This repository is a simple workspace include toolings on macOS for contributing to Swift and its related project.
Clone swift
from GitHub.
$ make swift
This swift
is cloned out with --depth=1
. Then, run
$ make update
to clone all the other repositories, or update them.
To build swift,
$ make build
It will use sccache
. See below for the details.
To build toolchain,
$ make build-toolchain
It will take much longer time than make build
.
NOTE: On Apple Silicon and/or macOS 12.3, for now, it seems needed to modify preset configuration. See inline comments in the build script.
To clean,
$ make clean
which will removes all derived files.
Use Docker. Current directory is attached to /src
volume.
This is very fast because it is using nightly Swift toolchain and not
build Swift itself.
To forcibly update Docker image, delete .docker-build
.
$ make docker
root@c59f24826e6b:/src# /scripts/build-swift-corelibs-foundation.sh
See how-to documentations (currently Japanese only.)
To build swift, run
$ ./swift/utils/build-script --release-debuginfo
See https://github.com/apple/swift/blob/master/docs/DevelopmentTips.md for the details.
To build swift, run
$ brew install sccache
$ export SCCACHE_CACHE_SIZE="50G"
$ sccache --start-server
$ ./swift/utils/build-script --sccache --release-debuginfo
To see cache,
$ sccache -s
The cache are available at ~/Library/Caches/Mozilla.sccache
.