Aborted(). Build with -sASSERTIONS for more info. #1810

Closed
opened 2025-05-12 02:52:13 -07:00 by JunYang-tes · 1 comment
JunYang-tes commented 2025-05-12 02:52:13 -07:00 (Migrated from github.com)

hi,
I am using it in nodejs and I got this crash. I can't figure out how to build it with -sASSERTIONS ?

Regards.

hi, I am using it in nodejs and I got this crash. I can't figure out how to build it with -sASSERTIONS ? Regards.
JunYang-tes commented 2025-05-12 19:12:47 -07:00 (Migrated from github.com)

For someone who get the same issue:
Modify javascript/CMakeLists.txt:

add_link_options(
    ${COMPILE_OPTIONS}
    "SHELL:--closure 1"
    "SHELL:--memory-init-file 0"
    "SHELL:--no-entry"
    "SHELL:-s ALLOW_MEMORY_GROWTH=1"
-    "SHELL:-s ASSERTIONS=0"
+    "SHELL:-s ASSERTIONS=1"
    "SHELL:-s DYNAMIC_EXECUTION=0"
    "SHELL:-s EXPORT_NAME='loadYoga'"
    "SHELL:-s FETCH_SUPPORT_INDEXEDDB=0"
    "SHELL:-s FILESYSTEM=0"
    "SHELL:-s MALLOC='emmalloc'"
    "SHELL:-s MODULARIZE=1"
    "SHELL:-s EXPORT_ES6=1"
    "SHELL:-s WASM=1"
    "SHELL:-s TEXTDECODER=0"
    # SINGLE_FILE=1 combined with ENVIRONMENT='web' creates code that works on
    # both bundlders and Node.
    "SHELL:-s SINGLE_FILE=1"
    "SHELL:-s ENVIRONMENT='web'")

For someone who get the same issue: Modify javascript/CMakeLists.txt: ```diff add_link_options( ${COMPILE_OPTIONS} "SHELL:--closure 1" "SHELL:--memory-init-file 0" "SHELL:--no-entry" "SHELL:-s ALLOW_MEMORY_GROWTH=1" - "SHELL:-s ASSERTIONS=0" + "SHELL:-s ASSERTIONS=1" "SHELL:-s DYNAMIC_EXECUTION=0" "SHELL:-s EXPORT_NAME='loadYoga'" "SHELL:-s FETCH_SUPPORT_INDEXEDDB=0" "SHELL:-s FILESYSTEM=0" "SHELL:-s MALLOC='emmalloc'" "SHELL:-s MODULARIZE=1" "SHELL:-s EXPORT_ES6=1" "SHELL:-s WASM=1" "SHELL:-s TEXTDECODER=0" # SINGLE_FILE=1 combined with ENVIRONMENT='web' creates code that works on # both bundlders and Node. "SHELL:-s SINGLE_FILE=1" "SHELL:-s ENVIRONMENT='web'") ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1810
No description provided.