Merge pull request #610 from aofei/build

build: replicate macOS `-dead_strip` optimization on Linux
This commit is contained in:
xushiwei
2024-07-30 10:18:27 +08:00
committed by GitHub

View File

@@ -361,6 +361,8 @@ func linkMainPkg(ctx *context, pkg *packages.Package, pkgs []*aPackage, llFiles
args,
"-rpath", "$ORIGIN",
"-rpath", "$ORIGIN/../lib",
"-fdata-sections",
"-ffunction-sections",
"-Xlinker", "--gc-sections",
"-lm",
"-latomic",