just add '-fvisibility=hidden' for android in order to decrease lib's size

This commit is contained in:
shuxin   zheng 2019-09-24 11:21:36 +08:00
parent 2c78c1961b
commit 2179f6880a
3 changed files with 9 additions and 3 deletions

View File

@ -14,6 +14,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Android")
add_definitions("-DANDROID")
add_definitions("-DACL_CLIENT_ONLY")
add_definitions("-Wno-invalid-source-encoding")
add_definitions("-fvisibility=hidden")
add_definitions("-fvisibility-inlines-hidden")
add_definitions("-Wno-unused-command-line-argument")
string(APPEND CMAKE_C_FLAGS " -Qunused-arguments")
set(UNIX_OS true)

View File

@ -11,8 +11,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Android")
add_definitions("-flto")
add_definitions("-DANDROID")
add_definitions("-DACL_CLIENT_ONLY")
add_definitions("-Wno-unused-command-line-argument")
add_definitions("-Wno-unused-command-line-argument")
add_definitions("-Wno-invalid-source-encoding")
add_definitions("-fvisibility=hidden")
add_definitions("-fvisibility-inlines-hidden")
string(APPEND CMAKE_CXX_FLAGS " -Qunused-arguments")
set(UNIX_OS true)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")

View File

@ -11,8 +11,10 @@ if (CMAKE_SYSTEM_NAME MATCHES "Android")
add_definitions("-flto")
add_definitions("-DANDROID")
add_definitions("-Wno-invalid-source-encoding")
add_definitions("-Wno-unused-command-line-argument")
string(APPEND CMAKE_C_FLAGS " -Qunused-arguments")
add_definitions("-Wno-unused-command-line-argument")
add_definitions("-fvisibility=hidden")
add_definitions("-fvisibility-inlines-hidden")
string(APPEND CMAKE_C_FLAGS " -Qunused-arguments")
set(UNIX_OS true)
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
add_definitions("-Wno-invalid-source-encoding")