Merge "Provide an environment variable to disable mlgo" into main
This commit is contained in:
10
cc/lto.go
10
cc/lto.go
@@ -147,10 +147,12 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register allocation MLGO flags for ARM64.
|
if !ctx.Config().IsEnvFalse("THINLTO_USE_MLGO") {
|
||||||
if ctx.Arch().ArchType == android.Arm64 {
|
// Register allocation MLGO flags for ARM64.
|
||||||
ltoCFlags = append(ltoCFlags, "-mllvm -regalloc-enable-advisor=release")
|
if ctx.Arch().ArchType == android.Arm64 {
|
||||||
ltoLdFlags = append(ltoLdFlags, "-Wl,-mllvm,-regalloc-enable-advisor=release")
|
ltoCFlags = append(ltoCFlags, "-mllvm -regalloc-enable-advisor=release")
|
||||||
|
ltoLdFlags = append(ltoLdFlags, "-Wl,-mllvm,-regalloc-enable-advisor=release")
|
||||||
|
}
|
||||||
// Flags for training MLGO model.
|
// Flags for training MLGO model.
|
||||||
if ctx.Config().IsEnvTrue("THINLTO_EMIT_INDEXES_AND_IMPORTS") {
|
if ctx.Config().IsEnvTrue("THINLTO_EMIT_INDEXES_AND_IMPORTS") {
|
||||||
ltoLdFlags = append(ltoLdFlags, "-Wl,--save-temps=import")
|
ltoLdFlags = append(ltoLdFlags, "-Wl,--save-temps=import")
|
||||||
|
Reference in New Issue
Block a user