wip: strip tool

This commit is contained in:
Marcus Holland-Moritz 2025-07-25 15:00:56 +02:00
parent 0cb668b4d0
commit 2cb89a9d32
2 changed files with 6 additions and 1 deletions

View File

@ -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"

View File

@ -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 $<IF:$<BOOL:${ENABLE_STACKTRACE}>,--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} $<IF:$<BOOL:${ENABLE_STACKTRACE}>,--strip-debug,--strip-all> ${FILES_TO_STRIP})
endif()
endif()
endif()