Add bazel feature for wasm-exceptions (#1575)
This PR add bazel feature for `-fwasm-exceptions` Part of #1400
This commit is contained in:
@@ -363,6 +363,9 @@ def _impl(ctx):
|
|||||||
# Set if enabling exceptions.
|
# Set if enabling exceptions.
|
||||||
feature(name = "exceptions"),
|
feature(name = "exceptions"),
|
||||||
|
|
||||||
|
# Set if enabling wasm_exceptions.
|
||||||
|
feature(name = "wasm_exceptions"),
|
||||||
|
|
||||||
# This feature overrides the default optimization to prefer execution speed
|
# This feature overrides the default optimization to prefer execution speed
|
||||||
# over binary size (like clang -O3).
|
# over binary size (like clang -O3).
|
||||||
feature(
|
feature(
|
||||||
@@ -515,7 +518,7 @@ def _impl(ctx):
|
|||||||
flags = [
|
flags = [
|
||||||
"-fno-exceptions",
|
"-fno-exceptions",
|
||||||
],
|
],
|
||||||
not_features = ["exceptions"],
|
not_features = ["exceptions", "wasm_exceptions"],
|
||||||
),
|
),
|
||||||
flag_set(
|
flag_set(
|
||||||
actions = all_cpp_compile_actions,
|
actions = all_cpp_compile_actions,
|
||||||
@@ -524,6 +527,14 @@ def _impl(ctx):
|
|||||||
],
|
],
|
||||||
features = ["exceptions"],
|
features = ["exceptions"],
|
||||||
),
|
),
|
||||||
|
flag_set(
|
||||||
|
actions = all_cpp_compile_actions +
|
||||||
|
all_link_actions,
|
||||||
|
flags = [
|
||||||
|
"-fwasm-exceptions",
|
||||||
|
],
|
||||||
|
features = ["wasm_exceptions"],
|
||||||
|
),
|
||||||
# All compiles (and implicitly link)
|
# All compiles (and implicitly link)
|
||||||
flag_set(
|
flag_set(
|
||||||
actions = all_compile_actions +
|
actions = all_compile_actions +
|
||||||
|
|||||||
Reference in New Issue
Block a user