Commit 8fd654ce authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-21943 reduce the binary tarball size

strip all client binaries (that is, not mysqld) in bintars
parent 47e220a3
......@@ -108,6 +108,7 @@ ELSE()
SET(WITH_ZLIB bundled CACHE STRING "")
SET(WITH_JEMALLOC static CACHE STRING "")
SET(PLUGIN_AUTH_SOCKET STATIC CACHE STRING "")
SET(WITH_STRIPPED_CLIENT ON CACHE BOOL "Strip all client binaries")
ENDIF()
IF(NOT COMPILATION_COMMENT)
......
......@@ -79,7 +79,14 @@ FUNCTION (MYSQL_ADD_EXECUTABLE)
IF (COMP MATCHES ${SKIP_COMPONENTS})
RETURN()
ENDIF()
IF (WITH_STRIPPED_CLIENT AND NOT target STREQUAL mysqld)
INSTALL(CODE "SET(CMAKE_INSTALL_DO_STRIP 1)" ${COMP})
SET(reset_strip ON)
ENDIF()
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} COMPONENT ${COMP})
IF (reset_strip)
INSTALL(CODE "SET(CMAKE_INSTALL_DO_STRIP 0)" ${COMP})
ENDIF()
ENDIF()
# create mariadb named symlink
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment