Bazel add html support (#765)

* allow the bazel toolchain to output html files

* allow for cc_binary rule names to end in .js

* fix python name

* continue to call emcc instead of em++ for now

* small cleanup

Co-authored-by: Mitch Foley <mitchfoley@chromium.org>
This commit is contained in:
walkingeyerobot
2021-03-21 20:08:54 -04:00
committed by GitHub
parent ac98ca3882
commit 848260ed58
4 changed files with 61 additions and 25 deletions

View File

@@ -436,6 +436,11 @@ def _impl(ctx):
# https://emscripten.org/docs/debugging/Sanitizers.html
feature(name = "wasm_asan"),
feature(name = "wasm_ubsan"),
feature(
name = "output_format_js",
enabled = True,
),
]
crosstool_default_flag_sets = [
@@ -547,6 +552,11 @@ def _impl(ctx):
flags = ["-s", "PRINTF_LONG_DOUBLE=1"],
features = ["precise_long_double_printf"],
),
flag_set(
actions = all_link_actions,
flags = ["--oformat=js"],
features = ["output_format_js"],
),
# Opt
flag_set(