From a01874186703025369b72479181a0d34c47cd93c Mon Sep 17 00:00:00 2001 From: Abhishek Aggarwal Date: Tue, 1 Dec 2020 11:36:11 +0100 Subject: WASM compilation: Disable Pthreads + memory growth warning to be an error - Pthreads + memory growth causes JS accessing the wasm memory to be slow https://github.com/WebAssembly/design/issues/1271 - Leave this as a warning rather than making it a compilation error --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 67f18ef..9089827 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,6 +14,12 @@ if(MSVC) add_compile_options(/W4 /WX) else() add_compile_options(-Wall -Wextra -pedantic -Werror -Wno-unknown-pragmas) + if (COMPILE_WASM) + # Disabling Pthreads + memory growth warning to be an error for WASM + # Pthreads + memory growth causes JS accessing the wasm memory to be slow + # https://github.com/WebAssembly/design/issues/1271 + add_compile_options(-Wno-error=pthreads-mem-growth) + endif() endif() # Check if compiler supports AVX2 (this should only catch emscripten) -- cgit v1.2.3