From dc890d6915a004c398e5e83e0467433109ac129e Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 27 Sep 2021 22:55:39 +0000 Subject: [PATCH] DEPS: Add NodeJS binding dependencies These are behind the new `dawn_node` flag, which can be enabled by using the new `scripts/standalone-with-node.gclient` file. Bug: dawn:1123 Change-Id: Ia7ca715808e46b17f91338f56ffc6794d0104fd7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64900 Commit-Queue: Ben Clayton Reviewed-by: Austin Eng --- .gitignore | 2 ++ DEPS | 15 +++++++++++++++ scripts/standalone-with-node.gclient | 13 +++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 scripts/standalone-with-node.gclient diff --git a/.gitignore b/.gitignore index 38f94ca0d3..4e125087cc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ /third_party/jsoncpp /third_party/llvm-build /third_party/markupsafe +/third_party/node-addon-api +/third_party/node-api-headers /third_party/swiftshader /third_party/tint /third_party/vulkan-deps diff --git a/DEPS b/DEPS index f2e02478fd..b7a6fb64f8 100644 --- a/DEPS +++ b/DEPS @@ -9,6 +9,7 @@ vars = { 'swiftshader_git': 'https://swiftshader.googlesource.com', 'dawn_standalone': True, + 'dawn_node': False, # Also fetches dependencies required for building NodeJS bindings. } deps = { @@ -140,6 +141,20 @@ deps = { 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@789af048b388657987c59d4da406859034fe310f', 'condition': 'dawn_standalone', }, + + # Dependencies required to build Dawn NodeJS bindings + 'third_party/node-api-headers': { + 'url': '{github_git}/nodejs/node-api-headers.git@d68505e4055ecb630e14c26c32e5c2c65e179bba', + 'condition': 'dawn_node', + }, + 'third_party/node-addon-api': { + 'url': '{github_git}/nodejs/node-addon-api.git@4a3de56c3e4ed0031635a2f642b27efeeed00add', + 'condition': 'dawn_node', + }, + 'third_party/gpuweb': { + 'url': '{github_git}/gpuweb/gpuweb.git@67edc187f5305a72456663c34d51153601b79f3b', + 'condition': 'dawn_node', + }, } hooks = [ diff --git a/scripts/standalone-with-node.gclient b/scripts/standalone-with-node.gclient new file mode 100644 index 0000000000..b695f8a372 --- /dev/null +++ b/scripts/standalone-with-node.gclient @@ -0,0 +1,13 @@ +# Copy this file to /.gclient to bootstrap gclient in a +# standalone checkout of Dawn that also compiles dawn_node. + +solutions = [ + { "name" : ".", + "url" : "https://dawn.googlesource.com/dawn", + "deps_file" : "DEPS", + "managed" : False, + "custom_vars" : { + "dawn_node" : True, + } + }, +]