Skip to content

Commit 0c94eff

Browse files
committed
Remove inadvertently specified -fexceptions for TBBMalloc on WASM
1 parent 537a62c commit 0c94eff

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cmake/compilers/Clang.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright (c) 2020-2025 Intel Corporation
2+
# Copyright (c) 2025 UXL Foundation Contributors
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -14,14 +15,13 @@
1415

1516
if (EMSCRIPTEN)
1617
set(TBB_EMSCRIPTEN 1)
17-
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -fexceptions)
18-
set(TBB_TEST_LINK_FLAGS ${TBB_COMMON_LINK_FLAGS} -fexceptions -sINITIAL_MEMORY=65536000 -sALLOW_MEMORY_GROWTH=1 -sMALLOC=mimalloc -sEXIT_RUNTIME=1)
1918
if (NOT EMSCRIPTEN_WITHOUT_PTHREAD)
2019
set_property(TARGET Threads::Threads PROPERTY INTERFACE_LINK_LIBRARIES "-pthread")
2120
endif()
2221
set(TBB_EMSCRIPTEN_STACK_SIZE 65536)
2322
set(TBB_LIB_COMPILE_FLAGS -D__TBB_EMSCRIPTEN_STACK_SIZE=${TBB_EMSCRIPTEN_STACK_SIZE})
24-
set(TBB_TEST_LINK_FLAGS ${TBB_TEST_LINK_FLAGS} -sTOTAL_STACK=${TBB_EMSCRIPTEN_STACK_SIZE})
23+
set(TBB_TEST_COMPILE_FLAGS ${TBB_TEST_COMPILE_FLAGS} -fexceptions)
24+
set(TBB_TEST_LINK_FLAGS ${TBB_TEST_LINK_FLAGS} -fexceptions -sINITIAL_MEMORY=65536000 -sALLOW_MEMORY_GROWTH=1 -sMALLOC=mimalloc -sEXIT_RUNTIME=1 -sTOTAL_STACK=${TBB_EMSCRIPTEN_STACK_SIZE})
2525
unset(TBB_EMSCRIPTEN_STACK_SIZE)
2626
endif()
2727

src/tbb/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copyright (c) 2020-2025 Intel Corporation
2+
# Copyright (c) 2025 UXL Foundation Contributors
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -53,6 +54,10 @@ if (WIN32)
5354
set_target_properties(tbb PROPERTIES OUTPUT_NAME "tbb${TBB_BINARY_VERSION}")
5455
endif()
5556

57+
if (EMSCRIPTEN)
58+
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} -fexceptions)
59+
endif()
60+
5661
# TODO: Add statistics.cpp
5762

5863
target_compile_definitions(

0 commit comments

Comments
 (0)