Add instructions about fetch_dawn_dependencies
Change-Id: I64929e3a2a9bdd18ab2b99569d638e475eb6a83e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/140183
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/docs/building.md b/docs/building.md
index 16fb7b6..7e33e88 100644
--- a/docs/building.md
+++ b/docs/building.md
@@ -23,14 +23,14 @@
ls `xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs
```
-## Install `depot_tools`
+## Get the code and its dependencies
+
+### Using `depot_tools`
Dawn uses the Chromium build system and dependency management so you need to [install depot_tools] and add it to the PATH.
[install depot_tools]: http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up
-## Get the code
-
```sh
# Clone the repo as "dawn"
git clone https://dawn.googlesource.com/dawn dawn && cd dawn
@@ -42,6 +42,20 @@
gclient sync
```
+### Without `depot_tools`
+
+If you cannot or do not want to depend on `depot_tools`, you may use the `tools/fetch_dawn_dependencies.py` to clone the dependencies' repositories:
+
+```sh
+# Clone the repo as "dawn"
+git clone https://dawn.googlesource.com/dawn dawn && cd dawn
+
+# Fetch dependencies (lose equivalent of gclient sync)
+python tools/fetch_dawn_dependencies.py --use-test-deps
+```
+
+Use `python tools/fetch_dawn_dependencies.py -h` to know more about the available options. The `--use-test-deps` option used above specifies to also fetch dependencies needed by tests. Contrary to `depot_tools`, this scripts does not figure out option-dependent requirements automatically.
+
## Build Dawn
### Compiling using CMake + Ninja