Skip to content

Commit 47c47e4

Browse files
committed
wip
1 parent 1422755 commit 47c47e4

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ if (EMSCRIPTEN)
415415
target_link_libraries(xpython PRIVATE xeus-python-wasm xeus-lite)
416416

417417
include(WasmBuildOptions)
418-
xeus_wasm_compile_options(xpython)
418+
# xeus_wasm_compile_options(xpython)
419419
xeus_wasm_link_options(xpython "web,worker")
420420
target_link_options(xpython
421421
PUBLIC "SHELL: -s LZ4=1"
@@ -424,6 +424,11 @@ if (EMSCRIPTEN)
424424
PUBLIC "SHELL: -s MAIN_MODULE=1"
425425
PUBLIC "SHELL: -s WASM_BIGINT"
426426
PUBLIC "-s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=\"['\$Browser', '\$ERRNO_CODES']\" "
427+
PUBLIC "-fwasm-exceptions"
428+
PUBLIC "-lembind"
429+
)
430+
target_compile_options(xpython
431+
PUBLIC "-fwasm-exceptions"
427432
)
428433
endif()
429434

wasm_patches/post.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ Module.wasmTable = wasmTable;
44
// Emscripten has a bug where it accidentally exposes an empty object as Module.ERRNO_CODES
55
Module.ERRNO_CODES = ERRNO_CODES;
66

7+
Module['getCppExceptionTag'] = getCppExceptionTag;
8+
Module['getExceptionMessage'] = getExceptionMessage;
9+
710
Module['async_init'] = async function(
811
kernel_root_url,
912
pkg_root_url,

0 commit comments

Comments
 (0)