Remove Node/LLVM overrides from activate-emsdk
We only use emsdk as a toolchain to build a emdawnwebgpu_pkg, samples,
and tests, so it isn't important to override the Node and LLVM binary
paths to use the ones Dawn uses. It's a bit fragile/incomplete (our LLVM
releases don't include binaries that Emscripten needs; the LLVM version
could mismatch; etc.) so it's easiest to just remove for now. We can
bring it back later if needed.
This also obsoletes a bug in activate-emsdk on Linux where PYTHON wasn't
set, so `del PYTHON` didn't work.
Bug: 371024051
Change-Id: I34a206467395de4515182fded6ec63068353f864
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/238814
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/DEPS b/DEPS
index cdcd872..bd55563 100644
--- a/DEPS
+++ b/DEPS
@@ -676,42 +676,8 @@
{
'name': 'activate_emsdk_linux',
'pattern': '.',
- 'condition': 'dawn_wasm and host_os == "linux"',
- 'action': [ 'python3',
- 'tools/activate-emsdk',
- '--node', 'third_party/node/node-linux-x64/bin/node',
- '--llvm', 'third_party/llvm-build/Release+Asserts/bin'
- ],
- },
- {
- 'name': 'activate_emsdk_mac_x64',
- 'pattern': '.',
- 'condition': 'dawn_wasm and host_os == "mac" and host_cpu == "x64"',
- 'action': [ 'python3',
- 'tools/activate-emsdk',
- '--node', 'third_party/node/node-darwin-x64/bin/node',
- '--llvm', 'third_party/llvm-build/Release+Asserts/bin'
- ],
- },
- {
- 'name': 'activate_emsdk_mac_arm64',
- 'pattern': '.',
- 'condition': 'dawn_wasm and host_os == "mac" and host_cpu == "arm64"',
- 'action': [ 'python3',
- 'tools/activate-emsdk',
- '--node', 'third_party/node/node-darwin-arm64/bin/node',
- '--llvm', 'third_party/llvm-build/Release+Asserts/bin'
- ],
- },
- {
- 'name': 'activate_emsdk_win',
- 'pattern': '.',
- 'condition': 'dawn_wasm and host_os == "win"',
- 'action': [ 'python3',
- 'tools/activate-emsdk',
- '--node', 'third_party/node/node.exe',
- '--llvm', 'third_party/llvm-build/Release+Asserts/bin'
- ],
+ 'condition': 'dawn_wasm',
+ 'action': [ 'python3', 'tools/activate-emsdk' ],
},
# Configure remote exec cfg files
diff --git a/tools/activate-emsdk b/tools/activate-emsdk
index a5ffb04..f301927 100644
--- a/tools/activate-emsdk
+++ b/tools/activate-emsdk
@@ -22,8 +22,6 @@
def main(args):
parser = argparse.ArgumentParser()
parser.add_argument('--get-emsdk-version', help='Print emsdk version and exit.', action='store_true')
- parser.add_argument('--node', help='Path to nodejs binary.')
- parser.add_argument('--llvm', help='Path to LLVM binaries.')
options = parser.parse_args()
if options.get_emsdk_version:
@@ -42,18 +40,8 @@
print ('Failed to activate emsdk')
return 1
- # Append overrides to the default .emscripten file for certain binaries.
- em_overrides = '''
-# Overrides from dawn/tools/activate-emsdk:
-del PYTHON
-'''
- if options.node:
- em_overrides += f"NODE_JS = emsdk_path + '/../../{options.node}'\n"
- if options.llvm:
- em_overrides += f"LLVM_ROOT = emsdk_path + '/../../{options.llvm}'\n"
- with open(EMSDK_CONFIG_PATH, 'a') as f:
- f.write(em_overrides)
-
+ # If we ever need to override the Python, Node, and LLVM binaries used by Emscripten, do that
+ # here. See https://dawn-review.googlesource.com/c/dawn/+/238814/4..5 which removed support.
if __name__ == '__main__':
sys.exit(main(sys.argv))