Skip to content

Commit

Permalink
Strip ".comment" section
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkaW committed Feb 7, 2021
1 parent 8a46e8a commit 2adf3fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions module/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ add_library(${MODULE_NAME} SHARED
target_link_libraries(${MODULE_NAME} log riru::riru nativehelper::nativehelper_header_only)
set_target_properties(${MODULE_NAME} PROPERTIES LINK_FLAGS_RELEASE -s)

add_custom_command(TARGET ${MODULE_NAME} POST_BUILD
COMMAND ${CMAKE_STRIP} --remove-section=.comment "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lib${MODULE_NAME}.so")

add_executable(libstarter.so
starter.cpp misc.cpp android.cpp)
target_link_libraries(libstarter.so log riru::riru)
set_target_properties(libstarter.so PROPERTIES LINK_FLAGS_RELEASE -s)

add_custom_command(TARGET libstarter.so POST_BUILD
COMMAND ${CMAKE_STRIP} --remove-section=.comment "libstarter.so")

0 comments on commit 2adf3fc

Please sign in to comment.