diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index ed002cc0df..f7324cee09 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -312,7 +312,7 @@ endif() if (onnxruntime_BUILD_WEBASSEMBLY) # Enable LTO for release single-thread build - if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT onnxruntime_ENABLE_WEBASSEMBLY_THREADS) + if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") # NOTES: # (1) LTO does not work for WebAssembly multi-thread. (segment fault in worker) # (2) "-flto=thin" does not work correctly for wasm-ld. diff --git a/cmake/onnxruntime_unittests.cmake b/cmake/onnxruntime_unittests.cmake index 26da6d525c..8615982519 100644 --- a/cmake/onnxruntime_unittests.cmake +++ b/cmake/onnxruntime_unittests.cmake @@ -669,15 +669,7 @@ if(WIN32) endif() if (onnxruntime_BUILD_WEBASSEMBLY) - if (onnxruntime_ENABLE_WEBASSEMBLY_THREADS) - # WebAssembly threading support in node is an experimental feature yet - # and that makes some intensive threadpool tests fail randomly. - # Will enable this test when node.js releases a stable version supporting multi-threads. - list(REMOVE_ITEM all_tests - "${TEST_SRC_DIR}/platform/threadpool_test.cc" - "${TEST_SRC_DIR}/providers/cpu/nn/string_normalizer_test.cc" - ) - else() + if (NOT onnxruntime_ENABLE_WEBASSEMBLY_THREADS) list(REMOVE_ITEM all_tests "${TEST_SRC_DIR}/framework/execution_frame_test.cc" "${TEST_SRC_DIR}/framework/inference_session_test.cc"