Skip to content

Commit 03fe9d1

Browse files
committed
Use target_link_options instead of set_target_properties for linking
1 parent b602c32 commit 03fe9d1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/Interpreter/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ if(EMSCRIPTEN)
129129
#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
130130
# https://github.com/llvm/llvm-project/blob/128e2e446e90c3b1827cfc7d4d19e3c0976beff3/llvm/cmake/modules/HandleLLVMOptions.cmake#L318 . The PR to do try to do this is here
131131
# 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}"
132+
set_target_properties(clangCppInterOp
133+
PROPERTIES NO_SONAME 1
134+
)
135+
target_link_options(clangCppInterOp
136+
PRIVATE "SHELL: -s WASM_BIGINT"
137+
PRIVATE "SHELL: -s SIDE_MODULE=1"
138+
PRIVATE "SHELL: ${SYMBOLS_LIST}"
135139
)
136140
if (CPPINTEROP_ENABLE_TESTING)
137141
# When compiling Emscripten tests the shared library it links to is expected to be in the same folder as the compiled Javascript

0 commit comments

Comments
 (0)