Change lto_test to use GlobalThinLTO configuration
This is now the default, and we will be removing non-GlobalThinLTO configuration. Also changed handling for lto: never, it doesn't need to create an lto-none variant. Change-Id: I971baa920df867fb762923d925eed22215a89c27 Test: presubmit
This commit is contained in:
@@ -35,11 +35,11 @@ import (
|
||||
// optimized at link time and may not be compatible with features that require
|
||||
// LTO, such as CFI.
|
||||
//
|
||||
// This file adds support to soong to automatically propogate LTO options to a
|
||||
// This file adds support to soong to automatically propagate LTO options to a
|
||||
// new variant of all static dependencies for each module with LTO enabled.
|
||||
|
||||
type LTOProperties struct {
|
||||
// Lto must violate capitialization style for acronyms so that it can be
|
||||
// Lto must violate capitalization style for acronyms so that it can be
|
||||
// referred to in blueprint files as "lto"
|
||||
Lto struct {
|
||||
Never *bool `android:"arch_variant"`
|
||||
@@ -67,10 +67,12 @@ func (lto *lto) props() []interface{} {
|
||||
}
|
||||
|
||||
func (lto *lto) begin(ctx BaseModuleContext) {
|
||||
// First, determine the module indepedent default LTO mode.
|
||||
// First, determine the module independent default LTO mode.
|
||||
ltoDefault := GlobalThinLTO(ctx)
|
||||
if ctx.Config().IsEnvTrue("DISABLE_LTO") {
|
||||
ltoDefault = false
|
||||
} else if lto.Never() {
|
||||
ltoDefault = false
|
||||
} else if ctx.Host() {
|
||||
// Performance and binary size are less important for host binaries.
|
||||
ltoDefault = false
|
||||
|
Reference in New Issue
Block a user