Skip to content

Commit

Permalink
Fix Abseil + RE2 support
Browse files Browse the repository at this point in the history
Depends on Emscripten update in proxy-wasm#172.

Signed-off-by: Martijn Stevenson <[email protected]>
  • Loading branch information
martijneken committed Oct 10, 2024
1 parent 6b3dc93 commit cf82fb7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bazel/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ load("@rules_cc//cc:defs.bzl", "cc_binary")
def _optimized_wasm_cc_binary_transition_impl(settings, attr):
# TODO(PiotrSikora): Add -flto to copts/linkopts when fixed in emsdk.
# See: https://github.com/emscripten-core/emsdk/issues/971
#
# Define STANDALONE_WASM at compile time as well as link time (below).
# This fixes Abseil by not including Emscripten JS stacktraces + symbolization.
# TODO(martijneken): Remove after Abseil stops using this define.
return {
"//command_line_option:copt": ["-O3"],
"//command_line_option:copt": ["-O3", "-DSTANDALONE_WASM"],
"//command_line_option:cxxopt": [],
"//command_line_option:linkopt": [],
"//command_line_option:collect_code_coverage": False,
Expand Down Expand Up @@ -102,6 +106,8 @@ def proxy_wasm_cc_binary(
)

wasm_cc_binary(
standalone = True,
threads = "off",
name = "wasm_" + name,
cc_target = ":proxy_wasm_" + name.rstrip(".wasm"),
tags = tags + [
Expand Down

0 comments on commit cf82fb7

Please sign in to comment.