From e23aac7d1c7d052048e68a0b5987ab99cd15cc6d Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 14 Apr 2022 12:22:36 -0700 Subject: [PATCH] Fix https://github.com/emscripten-core/emsdk/issues/1020 (#1035) --- bazel/emscripten_toolchain/BUILD.bazel | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bazel/emscripten_toolchain/BUILD.bazel b/bazel/emscripten_toolchain/BUILD.bazel index eb36959992..4c85acfce2 100644 --- a/bazel/emscripten_toolchain/BUILD.bazel +++ b/bazel/emscripten_toolchain/BUILD.bazel @@ -2,6 +2,11 @@ load(":crosstool.bzl", "emscripten_cc_toolchain_config_rule") package(default_visibility = ["//visibility:public"]) +# Name depends on rules_nodejs version being used. +# https://github.com/emscripten-core/emsdk/issues/1020 +# https://github.com/bazelbuild/rules_nodejs/issues/3375 +node_files = "@nodejs_host//:node_files" if existing_rule("@nodejs_host//:node_files") else "@nodejs//:node_files" + filegroup( name = "common-script-includes", srcs = [ @@ -14,7 +19,7 @@ filegroup( "env.bat", "@emsdk//:binaries", "@emsdk//:node_modules", - "@nodejs//:node_files", + node_files, ], ) @@ -31,7 +36,7 @@ filegroup( "link_wrapper.py", ":common-script-includes", "@emsdk//:binaries", - "@nodejs//:node_files", + node_files, ], ) @@ -41,7 +46,7 @@ filegroup( ":compile-emscripten", ":link-emscripten", "@emsdk//:binaries", - "@nodejs//:node_files", + node_files, ], )