Skip to content

Commit dad83f5

Browse files
authored
Update CMakeLists.txt
1 parent a72ab9a commit dad83f5

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

unittests/CppInterOp/TestSharedLib/CMakeLists.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,13 @@ set_output_directory(TestSharedLib
1515
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/unittests/bin/$<CONFIG>/
1616
)
1717

18-
set_target_properties(TestSharedLib PROPERTIES
18+
19+
if(EMSCRIPTEN)
20+
set_target_properties(TestSharedLib PROPERTIES
1921
NO_SONAME 1
2022
COMPILE_FLAGS "-s SIDE_MODULE=1"
2123
LINK_FLAGS "-s WASM_BIGINT -s SIDE_MODULE=1 -Wl,--export-all"
2224
SUFFIX ".wasm"
23-
)
24-
25-
if(EMSCRIPTEN)
26-
# Without this you get an error that -gc-sections and -r cannot be used together.
27-
# Not sure I have picked the correct one to keep
28-
target_link_options(TestSharedLib PRIVATE
29-
"SHELL: -Wl,--no-gc-sections -s LINKABLE=1 -s WASM_BIGINT -s SIDE_MODULE=1"
3025
)
3126
endif()
3227

0 commit comments

Comments
 (0)