Skip to content

Commit 90d8c07

Browse files
committed
Update emsdk version to 3.1.67 in Bazel configuration
This CL mostly follows the instructions in https://github.com/emscripten-core/emsdk/blob/main/bazel/README.md. Even so, there are a few things that are worth mentioning: 1. I tested the changes locally and in my tests incompatible_enable_cc_toolchain_resolution bazel flag made no difference (e.g. everything builds with or without the flag); I still keep it though because instructions say that it should be there and it does not cause any harm. 2. I don't think that we still need to patch emsdk to exclude npm modules from the toolchain, because it appears that upstream already removed those as a toolchain dependency in emscripten-core/emsdk#1045. It's worth noting, that even though I don't think that emsdk patch is still needed, I actually wasn't able to reproduce the problem reported in #149 locally without the emsdk.patch even with the current version of emsdk used by C++ SDK. Signed-off-by: Mikhail Krinkin <[email protected]>
1 parent 2ffee66 commit 90d8c07

File tree

4 files changed

+14
-54
lines changed

4 files changed

+14
-54
lines changed

.bazelrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# NOTE: incompatible_enable_cc_toolchain_resolution is set by default on Bazel
2+
# versions 7.0+, see https://github.com/bazelbuild/bazel/issues/7260.
3+
#
4+
# emsdk documentation asks to set this flag (see
5+
# https://github.com/emscripten-core/emsdk/blob/main/bazel/README.md). And even
6+
# though things seem to work even without this flag, given that this flag
7+
# enables improved Bazel C++ toolchain resolution method that became the
8+
# default in newer Bazel version and does not cause problems, we keep it.
9+
build --incompatible_enable_cc_toolchain_resolution

bazel/dependencies_extra.bzl

+2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
# limitations under the License.
1414

1515
load("@emsdk//:emscripten_deps.bzl", "emscripten_deps")
16+
load("@emsdk//:toolchains.bzl", "register_emscripten_toolchains")
1617

1718
# Requires proxy_wasm_cpp_sdk_dependencies() to be loaded first.
1819
def proxy_wasm_cpp_sdk_dependencies_extra():
1920
emscripten_deps()
21+
register_emscripten_toolchains()

bazel/emsdk.patch

-48
This file was deleted.

bazel/repositories.bzl

+3-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,9 @@ def proxy_wasm_cpp_sdk_repositories():
1919
maybe(
2020
http_archive,
2121
name = "emsdk",
22-
sha256 = "1ca0ff918d476c55707bb99bc0452be28ac5fb8f22a9260a8aae8a38d1bc0e27",
23-
# v3.1.7 with Bazel fixes
24-
strip_prefix = "emsdk-0ea8f8a8707070e9a7c83fbb4a3065683bcf1799/bazel",
25-
url = "https://github.com/emscripten-core/emsdk/archive/0ea8f8a8707070e9a7c83fbb4a3065683bcf1799.tar.gz",
26-
patches = ["@proxy_wasm_cpp_sdk//bazel:emsdk.patch"],
27-
patch_args = ["-p2"],
22+
sha256 = "0cb0eabd6e3ceb1a970a2363e67f2b1689c2d83fbeae1e75901213c1f84de2e2",
23+
strip_prefix = "emsdk-3.1.67/bazel",
24+
url = "https://github.com/emscripten-core/emsdk/archive/refs/tags/3.1.67.tar.gz",
2825
)
2926

3027
maybe(

0 commit comments

Comments
 (0)