Merge pull request #610 from aofei/build
build: replicate macOS `-dead_strip` optimization on Linux
This commit is contained in:
@@ -361,6 +361,8 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, llFiles
|
|||||||
args,
|
args,
|
||||||
"-rpath", "$ORIGIN",
|
"-rpath", "$ORIGIN",
|
||||||
"-rpath", "$ORIGIN/../lib",
|
"-rpath", "$ORIGIN/../lib",
|
||||||
|
"-fdata-sections",
|
||||||
|
"-ffunction-sections",
|
||||||
"-Xlinker", "--gc-sections",
|
"-Xlinker", "--gc-sections",
|
||||||
"-lm",
|
"-lm",
|
||||||
"-latomic",
|
"-latomic",
|
||||||
|
|||||||
Reference in New Issue
Block a user