mirror of
https://github.com/LSPosed/LSPlant.git
synced 2025-05-05 14:06:37 +08:00
Save symbols to file before striping
This commit is contained in:
parent
fa8dacdd00
commit
1fdea57bbe
@ -33,10 +33,15 @@ android {
|
|||||||
buildToolsVersion = androidBuildToolsVersion
|
buildToolsVersion = androidBuildToolsVersion
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
prefab = true
|
|
||||||
prefabPublishing = true
|
prefabPublishing = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
packagingOptions {
|
||||||
|
jniLibs {
|
||||||
|
excludes += "**.so"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
prefab {
|
prefab {
|
||||||
create("lsplant") {
|
create("lsplant") {
|
||||||
headers = "jni/include"
|
headers = "jni/include"
|
||||||
@ -70,7 +75,6 @@ android {
|
|||||||
"-fno-stack-protector",
|
"-fno-stack-protector",
|
||||||
"-fomit-frame-pointer",
|
"-fomit-frame-pointer",
|
||||||
"-Wno-builtin-macro-redefined",
|
"-Wno-builtin-macro-redefined",
|
||||||
"-Wl,--strip-all",
|
|
||||||
"-ffunction-sections",
|
"-ffunction-sections",
|
||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-Wno-unused-value",
|
"-Wno-unused-value",
|
||||||
@ -97,6 +101,12 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
all {
|
||||||
|
externalNativeBuild.cmake.arguments += "-DDEBUG_SYMBOLS_PATH=${project.buildDir.absolutePath}/symbols/$name"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lint {
|
lint {
|
||||||
abortOnError = true
|
abortOnError = true
|
||||||
checkReleaseBuilds = false
|
checkReleaseBuilds = false
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
cmake_minimum_required(VERSION 3.4.1)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
project(lsplant)
|
project(lsplant)
|
||||||
|
|
||||||
|
find_program(CCACHE ccache)
|
||||||
|
|
||||||
|
if (CCACHE)
|
||||||
|
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
|
||||||
|
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_definitions(-std=c++20)
|
add_definitions(-std=c++20)
|
||||||
|
|
||||||
set(SOURCES lsplant.cc)
|
set(SOURCES lsplant.cc)
|
||||||
@ -23,6 +30,15 @@ set(CFLAGS
|
|||||||
target_compile_options(${PROJECT_NAME} PRIVATE ${CFLAGS})
|
target_compile_options(${PROJECT_NAME} PRIVATE ${CFLAGS})
|
||||||
target_link_options(${PROJECT_NAME} PRIVATE -flto)
|
target_link_options(${PROJECT_NAME} PRIVATE -flto)
|
||||||
|
|
||||||
|
if (NOT DEFINED DEBUG_SYMBOLS_PATH)
|
||||||
|
set(DEBUG_SYMBOLS_PATH ${CMAKE_BINARY_DIR}/symbols)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${PROJECT_NAME}>
|
||||||
|
${DEBUG_SYMBOLS_PATH}/${ANDROID_ABI}/${PROJECT_NAME}
|
||||||
|
COMMAND ${CMAKE_STRIP} --strip-all $<TARGET_FILE:${PROJECT_NAME}>)
|
||||||
|
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC dex_builder log)
|
target_link_libraries(${PROJECT_NAME} PUBLIC dex_builder log)
|
||||||
target_link_libraries(${PROJECT_NAME}_static PRIVATE dex_builder_static)
|
target_link_libraries(${PROJECT_NAME}_static PRIVATE dex_builder_static)
|
||||||
target_link_libraries(${PROJECT_NAME}_static PUBLIC log)
|
target_link_libraries(${PROJECT_NAME}_static PUBLIC log)
|
||||||
|
2
library/jni/external/dex_builder
vendored
2
library/jni/external/dex_builder
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 2546d413f3dfe38b633fbba5aaa022959638035b
|
Subproject commit 315059bdee6839f040d0fd96a3144cfb57527b00
|
Loading…
x
Reference in New Issue
Block a user