From 00c73b401ad32e09950d9befa51ac260ef4e34fb Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 6 Jun 2022 15:36:24 -0400 Subject: [PATCH 1/4] Add additional files necessary for building with closure and on RBE --- bazel/emscripten_deps.bzl | 46 +++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/bazel/emscripten_deps.bzl b/bazel/emscripten_deps.bzl index 01baa01351..4d73a00714 100644 --- a/bazel/emscripten_deps.bzl +++ b/bazel/emscripten_deps.bzl @@ -18,12 +18,33 @@ filegroup( ]), ) +filegroup( + name = "emcc", + srcs = [ + "emscripten/emcc.py", + "emscripten/emscripten.py", + "emscripten/emscripten-version.txt", + "emscripten/cache/sysroot_install.stamp", + "emscripten/src/settings.js", + "emscripten/src/settings_internal.js", + ] + glob( + include = [ + "emscripten/third_party/**", + "emscripten/tools/**", + ], + exclude = [ + "**/__pycache__/**", + ], + ), +) + filegroup( name = "compiler_files", srcs = [ "emscripten/emcc.py", "bin/clang{bin_extension}", "bin/clang++{bin_extension}", + ":emcc", ":includes", ], ) @@ -40,15 +61,32 @@ filegroup( "bin/wasm-emscripten-finalize{bin_extension}", "bin/wasm-ld{bin_extension}", "bin/wasm-opt{bin_extension}", - ] + glob(["emscripten/node_modules/**"]), -) + "bin/wasm-metadce{bin_extension}", + ":emcc", + ] + glob( + include = [ + "emscripten/cache/sysroot/lib/**", + "emscripten/node_modules/**", + "emscripten/src/**", + ], + ), filegroup( name = "ar_files", srcs = [ - "emscripten/emar.py", "bin/llvm-ar{bin_extension}", - ], + "emscripten/emar.py", + "emscripten/emscripten-version.txt", + "emscripten/src/settings.js", + "emscripten/src/settings_internal.js", + ] + glob( + include = [ + "emscripten/tools/**", + ], + exclude = [ + "**/__pycache__/**", + ], + ), ) """ From 6165588d43f4721aab9506a50afbcf06af8b838e Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 6 Jun 2022 16:10:20 -0400 Subject: [PATCH 2/4] typo --- bazel/emscripten_deps.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/bazel/emscripten_deps.bzl b/bazel/emscripten_deps.bzl index 4d73a00714..b801651fea 100644 --- a/bazel/emscripten_deps.bzl +++ b/bazel/emscripten_deps.bzl @@ -70,6 +70,7 @@ filegroup( "emscripten/src/**", ], ), +) filegroup( name = "ar_files", From 9f141a4161ca49dd7ec476b065215afcc2b7e198 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Tue, 7 Jun 2022 08:14:55 -0400 Subject: [PATCH 3/4] remove extra emcc.py --- bazel/emscripten_deps.bzl | 2 -- 1 file changed, 2 deletions(-) diff --git a/bazel/emscripten_deps.bzl b/bazel/emscripten_deps.bzl index b801651fea..f23b07f3ae 100644 --- a/bazel/emscripten_deps.bzl +++ b/bazel/emscripten_deps.bzl @@ -41,7 +41,6 @@ filegroup( filegroup( name = "compiler_files", srcs = [ - "emscripten/emcc.py", "bin/clang{bin_extension}", "bin/clang++{bin_extension}", ":emcc", @@ -52,7 +51,6 @@ filegroup( filegroup( name = "linker_files", srcs = [ - "emscripten/emcc.py", "bin/clang{bin_extension}", "bin/llc{bin_extension}", "bin/llvm-ar{bin_extension}", From b03c1f9ac7bc00c5849d5b638b56f2a783b80abf Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Tue, 7 Jun 2022 13:28:07 -0400 Subject: [PATCH 4/4] emcc_common --- bazel/emscripten_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/emscripten_deps.bzl b/bazel/emscripten_deps.bzl index f23b07f3ae..d8e5de8055 100644 --- a/bazel/emscripten_deps.bzl +++ b/bazel/emscripten_deps.bzl @@ -19,7 +19,7 @@ filegroup( ) filegroup( - name = "emcc", + name = "emcc_common", srcs = [ "emscripten/emcc.py", "emscripten/emscripten.py", @@ -43,7 +43,7 @@ filegroup( srcs = [ "bin/clang{bin_extension}", "bin/clang++{bin_extension}", - ":emcc", + ":emcc_common", ":includes", ], ) @@ -60,7 +60,7 @@ filegroup( "bin/wasm-ld{bin_extension}", "bin/wasm-opt{bin_extension}", "bin/wasm-metadce{bin_extension}", - ":emcc", + ":emcc_common", ] + glob( include = [ "emscripten/cache/sysroot/lib/**",