build: Make the emdawnwebgpu suspension mode configurable (#4451)

This commit is contained in:
Sargun Vohra
2026-08-04 23:50:19 -07:00
committed by GitHub
parent 40be634126
commit e2b01754b6

4
vendor/dawn.cmake vendored
View File

@@ -11,6 +11,8 @@ endif()
if(MLN_WEBGPU_EMDAWN) if(MLN_WEBGPU_EMDAWN)
set(MLN_WEBGPU_EMDAWN_PORT "emdawnwebgpu" set(MLN_WEBGPU_EMDAWN_PORT "emdawnwebgpu"
CACHE STRING "Emscripten port name or path used for emdawnwebgpu") CACHE STRING "Emscripten port name or path used for emdawnwebgpu")
set(MLN_WEBGPU_EMDAWN_SUSPEND "-sASYNCIFY=1"
CACHE STRING "Emscripten suspension link option for emdawnwebgpu (-sASYNCIFY=1 or -sJSPI)")
message(STATUS "Configuring emdawnwebgpu port: ${MLN_WEBGPU_EMDAWN_PORT}") message(STATUS "Configuring emdawnwebgpu port: ${MLN_WEBGPU_EMDAWN_PORT}")
add_library(mbgl-vendor-dawn INTERFACE) add_library(mbgl-vendor-dawn INTERFACE)
@@ -26,7 +28,7 @@ if(MLN_WEBGPU_EMDAWN)
mbgl-vendor-dawn mbgl-vendor-dawn
INTERFACE INTERFACE
"--use-port=${MLN_WEBGPU_EMDAWN_PORT}" "--use-port=${MLN_WEBGPU_EMDAWN_PORT}"
"-sASYNCIFY=1" "${MLN_WEBGPU_EMDAWN_SUSPEND}"
) )
set_target_properties( set_target_properties(