Fix skwasm target in wasm_debug_unopt build. (#162100)

Fixes a couple issues in the skwasm build rules:
* `DEMANGLE_SUPPORT` is deprecated in emscripten, so just remove it.
* `sSHARED_MEMORY=1` needs to be added to the cflags so that emscripten
appends the proper feature flags (`-matomics` and `-mbulk-memory`) when
doing the compile so that the flags match the linking step.
This commit is contained in:
Jackson Gardner
2025-01-23 14:05:52 -08:00
committed by GitHub
parent 8c4ad50389
commit bfe31d607c
5 changed files with 7 additions and 4 deletions

View File

@@ -280,6 +280,9 @@ config("compiler") {
if (wasm_use_pthreads) {
cflags += [ "-pthread" ]
ldflags += [ "-pthread" ]
} if (wasm_shared_memory) {
cflags += [ "-sSHARED_MEMORY=1" ]
ldflags += [ "-sSHARED_MEMORY=1" ]
}
ldflags += [
"-s",

View File

@@ -12,6 +12,7 @@ declare_args() {
emsdk_dir = rebase_path("//flutter/prebuilts/emsdk")
wasm_use_pthreads = false
wasm_shared_memory = false
wasm_use_dwarf = false
}