From 17de463ff1fa97f771a04418b4c9cc20d8359497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20FRANCLET?= Date: Fri, 29 Aug 2025 13:47:34 +0200 Subject: [PATCH] set linker flags for common and max page size in CMakeLists.txt --- quickjs/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickjs/CMakeLists.txt b/quickjs/CMakeLists.txt index 5e9ef5a..aa7be64 100644 --- a/quickjs/CMakeLists.txt +++ b/quickjs/CMakeLists.txt @@ -24,6 +24,12 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DCONFIG_VERSION=\\\"2021-03-27\\\"") find_library(log-lib log) target_link_libraries(fastdev_quickjs_runtime ${log-lib}) +target_link_options(fastdev_quickjs_runtime PRIVATE "-Wl,-z,common-page-size=65536" "-Wl,-z,max-page-size=65536") + +set(CMAKE_SHARED_LINKER_FLAGS + "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,common-page-size=65536 -Wl,-z,max-page-size=65536" +) + if(MSVC) # https://github.com/ekibun/flutter_qjs/issues/7 target_compile_options(fastdev_quickjs_runtime PRIVATE "/Oi-")