Skip to content

Commit 2d44804

Browse files
author
Grok Compression
committed
emscripten: use consistent compile and link options across project
1 parent b2f1f5c commit 2d44804

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/lib/core/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/highway EXCLUDE_FROM_ALL)
148148
add_library(${GROK_CORE_NAME} ${GROK_LIBRARY_SRCS})
149149
set_target_properties(${GROK_CORE_NAME} PROPERTIES ${GROK_LIBRARY_PROPERTIES})
150150
target_compile_options(${GROK_CORE_NAME} PRIVATE ${GROK_COMPILE_OPTIONS} PRIVATE ${HWY_FLAGS})
151+
# set emcc options
151152
if (CMAKE_SYSTEM_NAME STREQUAL Emscripten)
152-
target_compile_options(${GROK_CORE_NAME} PUBLIC -matomics)
153+
target_link_options(${exe} PUBLIC -sASSERTIONS=1 -sPROXY_TO_PTHREAD -sTOTAL_MEMORY=1536MB -sEXIT_RUNTIME=1 -sUSE_PTHREADS=1)
154+
target_compile_options(${exe} PUBLIC -matomics)
153155
endif()
154156

155157
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")

thirdparty/liblcms2/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ set_target_properties(${LIBTARGET} PROPERTIES OUTPUT_NAME "${LIBTARGET}")
1414
set_property(TARGET ${LIBTARGET} PROPERTY POSITION_INDEPENDENT_CODE ON)
1515
# set emcc options
1616
if (CMAKE_SYSTEM_NAME STREQUAL Emscripten)
17-
target_compile_options(${LIBTARGET} PUBLIC -matomics)
17+
target_link_options(${exe} PUBLIC -sASSERTIONS=1 -sPROXY_TO_PTHREAD -sTOTAL_MEMORY=1536MB -sEXIT_RUNTIME=1 -sUSE_PTHREADS=1)
18+
target_compile_options(${exe} PUBLIC -matomics)
1819
endif()
1920

0 commit comments

Comments
 (0)