Merge "Pass -Wl,--as-needed when linking Rust binaries."

This commit is contained in:
Peter Collingbourne
2023-04-18 19:17:41 +00:00
committed by Gerrit Code Review

View File

@@ -104,7 +104,7 @@ func init() {
pctx.ImportAs("cc_config", "android/soong/cc/config")
pctx.StaticVariable("RustLinker", "${cc_config.ClangBin}/clang++")
pctx.StaticVariable("RustLinkerArgs", "")
pctx.StaticVariable("RustLinkerArgs", "-Wl,--as-needed")
pctx.StaticVariable("DeviceGlobalLinkFlags", strings.Join(deviceGlobalLinkFlags, " "))