提交 27408f19 编写于 作者: O Oilbeater 提交者: Sebastian Florek

Remove symbol table and debug info from go binary to reduce image size. (#2741)

上级 b9e6718b
......@@ -120,8 +120,10 @@ function backendProd(outputBinaryPathsAndArchs) {
'-installsuffix',
'cgo',
// record version info into src/version/version.go
// remove symbol tables and debug info to reduce binary size, see:
// https://golang.org/cmd/link/
'-ldflags',
conf.recordVersionExpression,
`${conf.recordVersionExpression} -w -s`,
'-o',
path,
conf.backend.mainPackageName,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册