Merge "Enable LTO for Rust dylibs"
This commit is contained in:
commit
b547b65ed3
2 changed files with 3 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue