mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-28 20:59:30 +00:00
Disable optimizations and symbol stripping on debug builds (#6147)
Signed-off-by: Silvio Moioli <silvio@moioli.net> Co-authored-by: Brad Davidson <brad@oatmail.org>
This commit is contained in:
@@ -24,6 +24,11 @@ fi
|
||||
CMD_NAME="dist/artifacts/k3s${BIN_SUFFIX}"
|
||||
SIZE=$(stat -c '%s' ${CMD_NAME})
|
||||
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
echo "DEBUG is set, ignoring binary size"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ${SIZE} -gt ${MAX_BINARY_SIZE} ]; then
|
||||
echo "k3s binary ${CMD_NAME} size ${SIZE} exceeds max acceptable size of ${MAX_BINARY_SIZE} bytes (${MAX_BINARY_MB} MiB)"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user