Skip to content

Commit 7f65c48

Browse files
committed
Update all CMakeLists.txt files to enable 16kb page size on Android.
1 parent 06f0b2d commit 7f65c48

File tree

15 files changed

+90
-0
lines changed

15 files changed

+90
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,12 @@ if(IOS OR ANDROID OR CMAKE_CROSSCOMPILING)
379379
set(FLATBUFFERS_BUILD_FLATC OFF CACHE BOOL "")
380380
endif()
381381

382+
if(ANDROID)
383+
target_link_options(flatbuffers
384+
PRIVATE
385+
"-Wl,-z,max-page-size=16384")
386+
endif()
387+
382388
if(FIREBASE_CPP_USE_PRIOR_GRADLE_BUILD)
383389
message(STATUS "flatbuffers is added with APP_BINARY_DIR ${APP_BINARY_DIR}")
384390
add_external_library(flatbuffers BINARY_DIR "${APP_BINARY_DIR}")

analytics/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ add_library(firebase_analytics STATIC
9595

9696
set_property(TARGET firebase_analytics PROPERTY FOLDER "Firebase Cpp")
9797

98+
if(ANDROID)
99+
target_link_options(firebase_analytics
100+
PRIVATE
101+
"-Wl,-z,max-page-size=16384")
102+
endif()
103+
98104
# Set up the dependency on Firebase App.
99105
target_link_libraries(firebase_analytics
100106
PUBLIC firebase_app)

app/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ else()
362362
target_compile_options(firebase_app PRIVATE -fno-exceptions)
363363
endif()
364364

365+
if(ANDROID)
366+
target_link_options(firebase_app
367+
PRIVATE
368+
"-Wl,-z,max-page-size=16384")
369+
endif()
370+
365371
target_include_directories(firebase_app
366372
PUBLIC
367373
${CMAKE_CURRENT_LIST_DIR}/src/include

app_check/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,12 @@ add_library(firebase_app_check STATIC
141141

142142
set_property(TARGET firebase_app_check PROPERTY FOLDER "Firebase Cpp")
143143

144+
if(ANDROID)
145+
target_link_options(firebase_app_check
146+
PRIVATE
147+
"-Wl,-z,max-page-size=16384")
148+
endif()
149+
144150
# Set up the dependency on Firebase App.
145151
target_link_libraries(firebase_app_check
146152
PUBLIC

auth/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ add_library(firebase_auth STATIC
160160

161161
set_property(TARGET firebase_auth PROPERTY FOLDER "Firebase Cpp")
162162

163+
if(ANDROID)
164+
target_link_options(firebase_auth
165+
PRIVATE
166+
"-Wl,-z,max-page-size=16384")
167+
endif()
168+
163169
# Set up the dependency on Firebase App.
164170
target_link_libraries(firebase_auth
165171
PUBLIC

database/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,12 @@ add_library(firebase_database STATIC
195195

196196
set_property(TARGET firebase_database PROPERTY FOLDER "Firebase Cpp")
197197

198+
if(ANDROID)
199+
target_link_options(firebase_database
200+
PRIVATE
201+
"-Wl,-z,max-page-size=16384")
202+
endif()
203+
198204
# Set up the dependency on Firebase App.
199205
target_link_libraries(firebase_database
200206
PUBLIC

dynamic_links/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ add_library(firebase_dynamic_links STATIC
4949

5050
set_property(TARGET firebase_dynamic_links PROPERTY FOLDER "Firebase Cpp")
5151

52+
if(ANDROID)
53+
target_link_options(firebase_dynamic_links
54+
PRIVATE
55+
"-Wl,-z,max-page-size=16384")
56+
endif()
57+
5258
# Set up the dependency on Firebase App.
5359
target_link_libraries(firebase_dynamic_links
5460
PUBLIC firebase_app)

firestore/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,12 @@ add_library(firebase_firestore STATIC
307307

308308
set_property(TARGET firebase_firestore PROPERTY FOLDER "Firebase Cpp")
309309

310+
if(ANDROID)
311+
target_link_options(firebase_firestore
312+
PRIVATE
313+
"-Wl,-z,max-page-size=16384")
314+
endif()
315+
310316
# Set up the dependency on Firebase App.
311317
target_link_libraries(firebase_firestore
312318
PUBLIC

functions/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ add_library(firebase_functions STATIC
6161

6262
set_property(TARGET firebase_functions PROPERTY FOLDER "Firebase Cpp")
6363

64+
if(ANDROID)
65+
target_link_options(firebase_functions
66+
PRIVATE
67+
"-Wl,-z,max-page-size=16384")
68+
endif()
69+
6470
# Set up the dependency on Firebase App.
6571
target_link_libraries(firebase_functions
6672
PUBLIC

gma/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ add_library(firebase_gma STATIC
101101

102102
set_property(TARGET firebase_gma PROPERTY FOLDER "Firebase Cpp")
103103

104+
if(ANDROID)
105+
target_link_options(firebase_gma
106+
PRIVATE
107+
"-Wl,-z,max-page-size=16384")
108+
endif()
109+
104110
# Set up the dependency on Firebase App.
105111
target_link_libraries(firebase_gma
106112
PUBLIC firebase_app)

0 commit comments

Comments
 (0)