Skip to content

Commit

Permalink
Fix #1020 (#1035)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfirebaugh authored Apr 14, 2022
1 parent 9483a23 commit e23aac7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bazel/emscripten_toolchain/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -14,7 +19,7 @@ filegroup(
"env.bat",
"@emsdk//:binaries",
"@emsdk//:node_modules",
"@nodejs//:node_files",
node_files,
],
)

Expand All @@ -31,7 +36,7 @@ filegroup(
"link_wrapper.py",
":common-script-includes",
"@emsdk//:binaries",
"@nodejs//:node_files",
node_files,
],
)

Expand All @@ -41,7 +46,7 @@ filegroup(
":compile-emscripten",
":link-emscripten",
"@emsdk//:binaries",
"@nodejs//:node_files",
node_files,
],
)

Expand Down

0 comments on commit e23aac7

Please sign in to comment.