Enable LTO for Rust dylibs
Test: m rust Test: TH Change-Id: I2257fe9fce1457821a5cf7df644c73f3137a62bb
This commit is contained in:
parent
aa3408a506
commit
5f78840308
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