Skip to content

Commit 947687d

Browse files
Allow emscripten builds.
1 parent 04fb8a4 commit 947687d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

+9
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,15 @@ elseif (CYGWIN)
254254
elseif (WIN32)
255255
message(STATUS "Platform: Windows")
256256
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_WINDOWS")
257+
elseif (EMSCRIPTEN)
258+
message(STATUS "Platform: Emscripten")
259+
list(APPEND Z3_DEPENDENT_EXTRA_CXX_LINK_FLAGS
260+
"-Os"
261+
"-s ALLOW_MEMORY_GROWTH=1"
262+
"-s ASSERTIONS=0"
263+
"-s DISABLE_EXCEPTION_CATCHING=0"
264+
"-s ERROR_ON_UNDEFINED_SYMBOLS=1"
265+
)
257266
else()
258267
message(FATAL_ERROR "Platform \"${CMAKE_SYSTEM_NAME}\" not recognised")
259268
endif()

0 commit comments

Comments
 (0)