Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton authored Jan 31, 2025
1 parent a72ab9a commit dad83f5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions unittests/CppInterOp/TestSharedLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@ set_output_directory(TestSharedLib
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/unittests/bin/$<CONFIG>/
)

set_target_properties(TestSharedLib PROPERTIES

if(EMSCRIPTEN)
set_target_properties(TestSharedLib PROPERTIES
NO_SONAME 1
COMPILE_FLAGS "-s SIDE_MODULE=1"
LINK_FLAGS "-s WASM_BIGINT -s SIDE_MODULE=1 -Wl,--export-all"
SUFFIX ".wasm"
)

if(EMSCRIPTEN)
# Without this you get an error that -gc-sections and -r cannot be used together.
# Not sure I have picked the correct one to keep
target_link_options(TestSharedLib PRIVATE
"SHELL: -Wl,--no-gc-sections -s LINKABLE=1 -s WASM_BIGINT -s SIDE_MODULE=1"
)
endif()

Expand Down

0 comments on commit dad83f5

Please sign in to comment.