[util/gpu/web] Export _web_set_palette in both build scripts

The previous palette commit added the C entry point and the
shell.html message handler but forgot to list _web_set_palette
in EXPORTED_FUNCTIONS, so emscripten dead-stripped it and the
'palette' postMessage was a silent no-op in the iframe.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Behdad Esfahbod committed 2026-04-15 15:29:42 -06:00
1 parent 59d819f09c
commit 7f6d75cd9e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ em++ \
"$SRCDIR/util/gpu/web/hb-gpu-web-webgpu.cc" \
--use-port=emdawnwebgpu \
-sALLOW_MEMORY_GROWTH=1 \
-sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_request_redraw","_web_cancel_gesture","_malloc","_free"]' \
-sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_set_palette","_web_request_redraw","_web_cancel_gesture","_malloc","_free"]' \
-sEXPORTED_RUNTIME_METHODS='["UTF8ToString","lengthBytesUTF8","stringToUTF8"]' \
--shell-file "$SRCDIR/util/gpu/web/shell.html" \
-o "$OUTDIR/webgpu.html"
+1 -1
View File
@@ -30,7 +30,7 @@ em++ \
-sUSE_WEBGL2=1 \
-sFULL_ES3=1 \
-sALLOW_MEMORY_GROWTH=1 \
-sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_toggle_animation","_web_reset","_web_request_redraw","_web_cancel_gesture","_web_pinch","_malloc","_free"]' \
-sEXPORTED_FUNCTIONS='["_main","_web_load_font","_web_set_text","_web_get_text","_web_set_variations","_web_set_palette","_web_toggle_animation","_web_reset","_web_request_redraw","_web_cancel_gesture","_web_pinch","_malloc","_free"]' \
-sEXPORTED_RUNTIME_METHODS='["UTF8ToString","lengthBytesUTF8","stringToUTF8"]' \
--shell-file "$SRCDIR/util/gpu/web/shell.html" \
-o "$OUTDIR/index.html"