[docs] Update cross compilation .gclient setup and instructions. Bug: None Change-Id: Ibdcae0a7e8ccba6366c1d7aacb01fa06d8181b2e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/319335 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Kai Ninomiya <kainino@chromium.org> Auto-Submit: Loko Kung <lokokung@google.com> Commit-Queue: Loko Kung <lokokung@google.com>
diff --git a/docs/building.md b/docs/building.md index 31a1ada..9d2e185 100644 --- a/docs/building.md +++ b/docs/building.md
@@ -97,6 +97,7 @@ The following packages are needed to build Dawn. (Package names are the Ubuntu names). +* `libfuse2` * `libxrandr-dev` * `libxinerama-dev` * `libxcursor-dev` @@ -107,7 +108,7 @@ * `npm` ```sh -sudo apt-get install libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev pkg-config nodejs npm +sudo apt-get install libfuse2 libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev pkg-config nodejs npm ``` Note, `nodejs` and `npm` are only needed if building `dawn.node`. @@ -162,8 +163,8 @@ of compilation checks during local Dawn development. It only supports Clang. It may not always work, and the resulting binaries are not guaranteed to work. -1. Add your target OS to the `target_os` array in `.gclient`. Or, just use - `standalone-maximal.gclient`. +1. Add your target OS to the `target_os` array in `.gclient`. Or, use + `standalone-maximal.gclient` and follow the instructions in it. 1. `gclient sync`. 1. Create a new `out/*` directory for each target build with the relevant GN args. The following configurations have been tested:
diff --git a/scripts/standalone-maximal.gclient b/scripts/standalone-maximal.gclient index 9a29619..0a4bc3c 100644 --- a/scripts/standalone-maximal.gclient +++ b/scripts/standalone-maximal.gclient
@@ -1,11 +1,12 @@ # Copy this file to <dawn clone dir>/.gclient to bootstrap gclient in a -# standalone checkout of Dawn for building emdawnwebgpu using emsdk. +# standalone checkout of Dawn for maximal target support including +# building cross compilation, emscripten builds, and node builds. After +# copying this file, users should uncomment the respective lines below +# based on the host OS. # # Use this instead of `standalone.gclient` if you are a Dawn developer and # would like to compile as much as possible on your local machine. -import platform - solutions = [ { "name": ".", @@ -24,7 +25,7 @@ # Enable all additional targets that are usable on this host OS. target_os = [] -if platform.system() == "Darwin": - target_os += ['win'] -elif platform.system() == "Linux": - target_os += ['win', 'mac'] +# If cross compiling on Mac, uncomment this: +#target_os += ['win'] +# If cross compiling on Linux, uncomment this: +#target_os += ['win', 'mac'] \ No newline at end of file