Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Commit 15d8c31

Browse files
committed
update cmakelists
1 parent c99f1ea commit 15d8c31

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

wasm/CMakeLists.txt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
4040
set(TARGET_SUFFIX)
4141
message(STATUS "TARGET_SUFFIX:${TARGET_SUFFIX}")
4242

43+
if(${TARGET_SUFFIX} STREQUAL ".mjs")
44+
set(ESM "1")
45+
else()
46+
set(ESM "0")
47+
endif()
48+
4349
if(EMSCRIPTEN)
4450
set_property(TARGET libxml PROPERTY SUFFIX "${TARGET_SUFFIX}")
4551

@@ -49,19 +55,18 @@ if(EMSCRIPTEN)
4955
PROPERTIES LINK_FLAGS "\
5056
-s MAXIMUM_MEMORY=4GB \
5157
-s ALLOW_MEMORY_GROWTH \
52-
-s STACK_OVERFLOW_CHECK=2 \
5358
-s NO_POLYFILL \
5459
-gsource-map \
5560
-s ENVIRONMENT=web,webview,worker,node \
5661
-s SINGLE_FILE \
5762
-s MODULARIZE \
63+
-s EXPORT_ES6=${ESM} \
5864
--profile \
65+
-s STACK_OVERFLOW_CHECK=2 \
5966
-s WASM_ASYNC_COMPILATION \
60-
-s ASSERTIONS=2 \
61-
-s RUNTIME_DEBUG \
62-
-s EXCEPTION_DEBUG \
6367
-s EMIT_PRODUCERS_SECTION \
6468
-s EVAL_CTORS=1 \
69+
-Oz \
6570
--no-entry \
6671
-lembind \
6772
--emit-tsd libxml.d.ts \

0 commit comments

Comments
 (0)