Merge "Enable LTO for Rust dylibs" am: b547b65ed3
am: ae3e4e85f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2468260 Change-Id: I09be4f237a2ac1ee68ac0c5b44c5195e7a358550 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -134,6 +134,8 @@ func TransformSrctoRlib(ctx ModuleContext, mainSrc android.Path, deps PathDeps,
|
||||
|
||||
func TransformSrctoDylib(ctx ModuleContext, mainSrc android.Path, deps PathDeps, flags Flags,
|
||||
outputFile android.WritablePath) buildOutput {
|
||||
flags.GlobalRustFlags = append(flags.GlobalRustFlags, "-C lto=thin")
|
||||
|
||||
return transformSrctoCrate(ctx, mainSrc, deps, flags, outputFile, "dylib")
|
||||
}
|
||||
|
||||
|
@@ -54,6 +54,7 @@ var (
|
||||
// TODO (b/267698452): Temporary workaround until the "no unstable
|
||||
// features" policy is enforced.
|
||||
"-A stable-features",
|
||||
"-Zdylib-lto",
|
||||
}
|
||||
|
||||
deviceGlobalRustFlags = []string{
|
||||
|
Reference in New Issue
Block a user