[bazel] Switch to platforms-based toolchain resolution (#1036)

This commit is contained in:
John Firebaugh
2022-11-08 14:21:06 -08:00
committed by GitHub
parent 92d9023adc
commit 005063304b
11 changed files with 41 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
load(":crosstool.bzl", "emscripten_cc_toolchain_config_rule")
load(":toolchain.bzl", "emscripten_cc_toolchain_config_rule")
package(default_visibility = ["//visibility:public"])
@@ -86,6 +86,13 @@ cc_toolchain_suite(
},
)
toolchain(
name = "cc-toolchain-wasm",
target_compatible_with = ["@platforms//cpu:wasm32"],
toolchain = ":cc-compiler-wasm",
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
)
py_binary(
name = "wasm_binary",
srcs = ["wasm_binary.py"],