Skip to content

Commit 2d2c631

Browse files
committed
Enable WASI threads and thread manager with shared-memory
When shared-memory is enabled, also enable WAMR_BUILD_LIB_WASI_THREADS and WAMR_BUILD_THREAD_MGR since shared memory requires thread support. Also propagate WAMR_DISABLE_STACK_HW_BOUND_CHECK alongside the existing WAMR_DISABLE_HW_BOUND_CHECK to avoid signal handler conflicts with GPU drivers and other runtimes.
1 parent d1a2599 commit 2d2c631

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

crates/wamr-sys/build.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,14 @@ fn setup_config(
110110
.define("WAMR_BUILD_LIBC_WASI", "1")
111111
.define("WAMR_BUILD_LIBC_BUILTIN", "0")
112112
.define("WAMR_DISABLE_HW_BOUND_CHECK", &feature_flags.disable_hw_bound_check)
113+
.define("WAMR_DISABLE_STACK_HW_BOUND_CHECK", &feature_flags.disable_hw_bound_check)
113114
.define("WAMR_BUILD_MULTI_MODULE", &feature_flags.enable_multi_module)
114115
.define("WAMR_BUILD_DUMP_CALL_STACK", &feature_flags.enable_dump_call_stack)
115116
.define("WAMR_BUILD_CUSTOM_NAME_SECTION", &feature_flags.enable_name_section)
116117
.define("WAMR_BUILD_LOAD_CUSTOM_SECTION", &feature_flags.enable_custom_section)
117118
.define("WAMR_BUILD_EXCE_HANDLING", &feature_flags.enable_exception_handling)
118-
.define("WAMR_BUILD_SHARED_MEMORY", &feature_flags.enable_shared_memory);
119+
.define("WAMR_BUILD_SHARED_MEMORY", &feature_flags.enable_shared_memory)
120+
.define("WAMR_BUILD_THREAD_MGR", &feature_flags.enable_shared_memory);
119121

120122
// always assume non-empty strings for these environment variables
121123

0 commit comments

Comments
 (0)