Add standalone_wasm feature to bazel emscripten_toolchain (#1145)
This commit is contained in:
committed by
GitHub
parent
32fba7b7c4
commit
bd7842e4ba
@@ -441,6 +441,9 @@ def _impl(ctx):
|
||||
name = "output_format_js",
|
||||
enabled = True,
|
||||
),
|
||||
feature(
|
||||
name = "wasm_standalone",
|
||||
),
|
||||
]
|
||||
|
||||
crosstool_default_flag_sets = [
|
||||
@@ -1015,6 +1018,11 @@ def _impl(ctx):
|
||||
flags = ["-Werror"],
|
||||
features = ["wasm_warnings_as_errors"],
|
||||
),
|
||||
flag_set(
|
||||
actions = all_link_actions,
|
||||
flags = ["-sSTANDALONE_WASM"],
|
||||
features = ["wasm_standalone"],
|
||||
),
|
||||
]
|
||||
|
||||
crosstool_default_env_sets = [
|
||||
|
||||
@@ -25,6 +25,9 @@ def _wasm_transition_impl(settings, attr):
|
||||
if attr.simd:
|
||||
features.append("wasm_simd")
|
||||
|
||||
if attr.standalone:
|
||||
features.append("wasm_standalone")
|
||||
|
||||
return {
|
||||
"//command_line_option:compiler": "emscripten",
|
||||
"//command_line_option:crosstool_top": "@emsdk//emscripten_toolchain:everything",
|
||||
@@ -86,6 +89,9 @@ _WASM_BINARY_COMMON_ATTRS = {
|
||||
"simd": attr.bool(
|
||||
default = False,
|
||||
),
|
||||
"standalone": attr.bool(
|
||||
default = False,
|
||||
),
|
||||
"_allowlist_function_transition": attr.label(
|
||||
default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user