Skip to content

Latest commit

 

History

History

Dawn

README.md

Building Dawn

This directory contains scripts that can be used to build Dawn for various platforms. These scripts are used in CI to build a static library artifact bundle. That is a bundle that contains static libraries for a number of different architectures and platforms.

Dawn and Chromium

Dawn does not have version numbers like most software libraries. This makes it hard to decide what to build. Since Dawn is tightly linked to Chromium, we choose what git hash of Dawn to build by matching it with a release of Chromium.

Using the CI Scripts

If you wish to build a version of Dawn yourself, you can use these CI scripts as follows:

# Recommended Python setup
python3 -m venv .venv
pip3 install -r requirements.txt

# Determine the latest release of Chromium Canary and get the Dawn hash
# Write the data to dawn_version.json
./ci_build_dawn.py get-dawn-version

# Download the Dawn source matching the given hash
./ci_build_dawn.py get-source --hash cc0a37d660cef88a78a751b9fc1431be3d1ce2eb

# Build Dawn, running these commands on the appropriate platform
# Note that macosx builds both Intel and Arm
./ci_build_dawn.py build-target --target macosx
./ci_build_dawn.py build-target --target iphoneos
./ci_build_dawn.py build-target --target iphonesimulator

# Or on a Linux machine
./ci_build_dawn.py build-target --target linux

# Combine the builds into an archive bundle (all build products need to be in the same filesystem)
./ci_build_dawn.py bundle --chromium-version 142.0.7404.0 --dawn-hash cc0a37d660cef88a78a751b9fc1431be3d1ce2eb --bundle-name dawn_webgpu_chromium_142.0.7404.0_canary_cc0a37d660cef88a78a751b9fc1431be3d1ce2eb