Skip to content

Commit cf82fb7

Browse files
committed
Fix Abseil + RE2 support
Depends on Emscripten update in #172. Signed-off-by: Martijn Stevenson <[email protected]>
1 parent 6b3dc93 commit cf82fb7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

bazel/defs.bzl

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
1818
def _optimized_wasm_cc_binary_transition_impl(settings, attr):
1919
# TODO(PiotrSikora): Add -flto to copts/linkopts when fixed in emsdk.
2020
# See: https://github.com/emscripten-core/emsdk/issues/971
21+
#
22+
# Define STANDALONE_WASM at compile time as well as link time (below).
23+
# This fixes Abseil by not including Emscripten JS stacktraces + symbolization.
24+
# TODO(martijneken): Remove after Abseil stops using this define.
2125
return {
22-
"//command_line_option:copt": ["-O3"],
26+
"//command_line_option:copt": ["-O3", "-DSTANDALONE_WASM"],
2327
"//command_line_option:cxxopt": [],
2428
"//command_line_option:linkopt": [],
2529
"//command_line_option:collect_code_coverage": False,
@@ -102,6 +106,8 @@ def proxy_wasm_cc_binary(
102106
)
103107

104108
wasm_cc_binary(
109+
standalone = True,
110+
threads = "off",
105111
name = "wasm_" + name,
106112
cc_target = ":proxy_wasm_" + name.rstrip(".wasm"),
107113
tags = tags + [

0 commit comments

Comments
 (0)