Skip to content

Commit

Permalink
Fix wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
tharun571 committed Sep 8, 2024
1 parent eb44849 commit 7a984f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ macro(xeus_cpp_create_target target_name linkage output_name)
endif()
elseif(EMSCRIPTEN)
# Include Emscripten Fetch API
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FETCH=1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -s FETCH=1 --disable-shared")

# Add Emscripten-specific compile options
add_compile_options(-s FETCH=1)
add_compile_options(-s FETCH=1 --disable-shared)

# Add Emscripten-specific link options
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s FETCH=1")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s FETCH=1 --disable-shared")

# Add Emscripten Fetch library only once
target_link_libraries(${target_name} PRIVATE fetch)
Expand Down
1 change: 0 additions & 1 deletion src/xmagics/xassist.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/************************************************************************************
* Copyright (c) 2023, xeus-cpp contributors *
* Copyright (c) 2023, Johan Mabille, Loic Gouarin, Sylvain Corlay, Wolf Vollprecht *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* *
Expand Down

0 comments on commit 7a984f3

Please sign in to comment.