Add hook to generate dawn version file using

- Generating the version file is important since it ensures that even when a checkout/tarball of the chromium files do not have the git related directories, Dawn is able to build with a unique version.
- Updated script to add a simple hash file output option since Dawn expects a one-liner hash.
- Pass the generated file path to Dawn via BUILD overrides so that it can be used.

Bug: dawn:549
Change-Id: Ib7aa6a7dd533d0b3652e619a2992db517850e08e
Reviewed-by: Austin Eng <>
Commit-Queue: Austin Eng <>
Reviewed-by: Takuto Ikuta <>
Cr-Commit-Position: refs/heads/main@{#1017038}
GitOrigin-RevId: a6cc0fdd1707eb86e8a98c6e5f28e20e851ef922
diff --git a/dawn.gni b/dawn.gni
index 288ceb2..80a4629 100644
--- a/dawn.gni
+++ b/dawn.gni
@@ -13,3 +13,5 @@
 dawn_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
 dawn_vulkan_validation_layers_dir =
+dawn_version_file = "//gpu/webgpu/DAWN_VERSION"