Documentation
¶
Overview ¶
Package build is the build flag logic shared across mage and the CLI
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GCFLags ¶
func GCFLags() string
GCFLags will return the gc flags needed to build this binary.
Only -l (disable inlining) is set, and it is set for its size effect: inlining copies a function body to every call site, which across this repo's dependency tree costs far more space than it buys a CLI that is not CPU-bound.
Two flags that used to be here were removed deliberately, see docs/dev/build-flags.md:
- -B (disable bounds checking) bought about 1% of binary size in exchange for removing bounds checks from every package in the tree, including the code that parses untrusted archives and registry responses. That is where a bounds check is what turns a malformed length field into a panic rather than an out-of-bounds read.
- -C does nothing for size. `go tool compile -help` documents it as "disable printing of columns in error messages" -- a diagnostic formatting flag with no effect on generated code.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.