diff --git a/.docker/build-linux.sh b/.docker/build-linux.sh index a8e8db26..12361138 100755 --- a/.docker/build-linux.sh +++ b/.docker/build-linux.sh @@ -295,6 +295,7 @@ if [[ "-$BUILD_TYPE-" == *-static-* ]]; then _TARGET="${_MARCH}-unknown-linux-musl" export CC="${_TARGET}-${CC}" export CXX="${_TARGET}-${CXX}" + export STRIP_TOOL="${_TARGET}-strip" export PATH="$_SYSROOT/usr/bin:$PATH" # if [[ "-$BUILD_TYPE-" == *-relsize-* ]]; then # _LIBSTDCXXDIR="/opt/static-libs/libstdc++-Os/lib" diff --git a/CMakeLists.txt b/CMakeLists.txt index e3bb11d9..64cf9f84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -999,7 +999,11 @@ if(STATIC_BUILD_DO_NOT_USE OR APPLE) if(APPLE) add_custom_target(strip COMMAND strip ${FILES_TO_STRIP}) else() - add_custom_target(strip COMMAND strip $,--strip-debug,--strip-all> ${FILES_TO_STRIP}) + set(STRIP_TOOL strip) + if(DEFINED ENV{STRIP_TOOL}) + set(STRIP_TOOL $ENV{STRIP_TOOL}) + endif() + add_custom_target(strip COMMAND ${STRIP_TOOL} $,--strip-debug,--strip-all> ${FILES_TO_STRIP}) endif() endif() endif()