Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make: strip symbol tables from all binaries by default
Strip the symbol tables and debug information from all binaries by default. This will not remove annotations needed for stack traces, so panic backtraces will still be readable. If debug information and symbol tables are needed during debugging, use `make NOSTRIP=1` to compile. This reduces the binary sizes (and thus the base memory consumption) as follows: before: -rwxr-xr-x 1 tklauser tklauser 46M Feb 21 14:05 cilium/cilium -rwxr-xr-x 1 tklauser tklauser 21M Feb 21 14:05 cilium-health/cilium-health -rwxr-xr-x 1 tklauser tklauser 71M Feb 21 14:05 daemon/cilium-agent -rwxr-xr-x 1 tklauser tklauser 74M Feb 21 14:05 operator/cilium-operator -rwxr-xr-x 1 tklauser tklauser 46M Feb 21 14:04 plugins/cilium-cni/cilium-cni after: -rwxr-xr-x 1 tklauser tklauser 46M Feb 21 14:08 cilium/cilium -rwxr-xr-x 1 tklauser tklauser 15M Feb 21 14:08 cilium-health/cilium-health -rwxr-xr-x 1 tklauser tklauser 52M Feb 21 14:08 daemon/cilium-agent -rwxr-xr-x 1 tklauser tklauser 55M Feb 21 14:08 operator/cilium-operator -rwxr-xr-x 1 tklauser tklauser 34M Feb 21 14:08 plugins/cilium-cni/cilium-cni summary: cilium 0MB (already stripped previously, see 8596bd9) cilium-agent ~19MB cilium-health ~6MB cilium-operator ~19MB cilium-cni ~12MB Also see https://blog.filippo.io/shrink-your-go-binaries-with-this-one-weird-trick/ Updates #6099 Updates #10056 Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
- Loading branch information