Skip to content

Commit 15b51c8

Browse files
authored
Merge branch 'main' into improve_test1
2 parents 05b6c46 + 4fd5386 commit 15b51c8

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

lib/Interpreter/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
if(EMSCRIPTEN)
22
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
3-
set(CMAKE_STRIP FALSE)
43
set(LLVM_LINK_COMPONENTS "")
54
else()
65
set(LLVM_LINK_COMPONENTS
@@ -129,9 +128,13 @@ if(EMSCRIPTEN)
129128
#FIXME: A patch is needed to llvm to remove -Wl,-z,defs since it is now recognised on emscripten. What needs to be removed is here
130129
# https://github.com/llvm/llvm-project/blob/128e2e446e90c3b1827cfc7d4d19e3c0976beff3/llvm/cmake/modules/HandleLLVMOptions.cmake#L318 . The PR to do try to do this is here
131130
# https://github.com/llvm/llvm-project/pull/123396
132-
set_target_properties(clangCppInterOp PROPERTIES
133-
NO_SONAME 1
134-
LINK_FLAGS "-s WASM_BIGINT -s SIDE_MODULE=1 ${SYMBOLS_LIST}"
131+
set_target_properties(clangCppInterOp
132+
PROPERTIES NO_SONAME 1
133+
)
134+
target_link_options(clangCppInterOp
135+
PRIVATE "SHELL: -s WASM_BIGINT"
136+
PRIVATE "SHELL: -s SIDE_MODULE=1"
137+
PRIVATE "SHELL: ${SYMBOLS_LIST}"
135138
)
136139
if (CPPINTEROP_ENABLE_TESTING)
137140
# When compiling Emscripten tests the shared library it links to is expected to be in the same folder as the compiled Javascript

unittests/CppInterOp/TestSharedLib/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ set_output_directory(TestSharedLib
1111

1212

1313
if (EMSCRIPTEN)
14-
set_target_properties(TestSharedLib PROPERTIES
15-
NO_SONAME 1
16-
LINK_FLAGS "-s WASM_BIGINT -s SIDE_MODULE=1"
14+
set_target_properties(TestSharedLib
15+
PROPERTIES NO_SONAME 1
16+
)
17+
target_link_options(TestSharedLib
18+
PRIVATE "SHELL: -s WASM_BIGINT"
19+
PRIVATE "SHELL: -s SIDE_MODULE=1"
1720
)
1821
endif()
1922

0 commit comments

Comments
 (0)