diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ef9a04e44..07e01efc0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -43,6 +43,9 @@ if(BUILD_BLS_TESTS) FetchContent_MakeAvailable(Catch2) find_package(Threads REQUIRED) add_executable(runtest test.cpp) + if(EMSCRIPTEN) + target_link_options(runtest PRIVATE "-sEXPORTED_FUNCTIONS=_malloc") + endif() target_link_libraries(runtest PRIVATE bls