[tools] Fix local Go generator compilation on Windows Fix a build failure on Windows inside the generate_sources step. The generator runner script (`tools/run.py`) previously invoked `go run` using an absolute path that begins with the drive letter (e.g., `C:\src\chromium...`). Go's package parser mistakes this for a remote module name. Furthermore, building within environments that inherit `GO111MODULE=off` (like certain siso/ninja configurations) forces the compiler to run in GOPATH mode. Under GOPATH mode, Go fails to locate local subpackages within the `dawn.googlesource.com/dawn` module since they do not live under `$GOPATH/src`. This change addresses the issues by: 1. Passing a relative path starting with `./` and using forward slashes (e.g. `./tools/src/cmd/gen`) to `go run`, forcing the package path parser to resolve it as a directory. 2. Explicitly setting `GO111MODULE=on` inside the subprocess environment to force Go to compile the local project packages using module mode. Bug: 519743871 Change-Id: I876afd94e06db8c4f424ddf9049e1e24a5c25f9a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/313675 Reviewed-by: Brian Sheedy <bsheedy@google.com> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Auto-Submit: Ganesh S. <ganesh@google.com> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.