Merge "lto: Rename Disabled to Never to reduce confusion"
This commit is contained in:
10
cc/lto.go
10
cc/lto.go
@@ -133,7 +133,7 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
|
|||||||
|
|
||||||
// Can be called with a null receiver
|
// Can be called with a null receiver
|
||||||
func (lto *lto) LTO() bool {
|
func (lto *lto) LTO() bool {
|
||||||
if lto == nil || lto.Disabled() {
|
if lto == nil || lto.Never() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ func (lto *lto) FullLTO() bool {
|
|||||||
|
|
||||||
func (lto *lto) ThinLTO() bool {
|
func (lto *lto) ThinLTO() bool {
|
||||||
if Bool(lto.Properties.GlobalThin) {
|
if Bool(lto.Properties.GlobalThin) {
|
||||||
if !lto.Disabled() && !lto.FullLTO() {
|
if !lto.Never() && !lto.FullLTO() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -155,8 +155,8 @@ func (lto *lto) ThinLTO() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Is lto.never explicitly set to true?
|
// Is lto.never explicitly set to true?
|
||||||
func (lto *lto) Disabled() bool {
|
func (lto *lto) Never() bool {
|
||||||
return lto.Properties.Lto.Never != nil && *lto.Properties.Lto.Never
|
return Bool(lto.Properties.Lto.Never)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Propagate lto requirements down from binaries
|
// Propagate lto requirements down from binaries
|
||||||
@@ -184,7 +184,7 @@ func ltoDepsMutator(mctx android.TopDownMutatorContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if dep, ok := dep.(*Module); ok && dep.lto != nil &&
|
if dep, ok := dep.(*Module); ok && dep.lto != nil &&
|
||||||
!dep.lto.Disabled() {
|
!dep.lto.Never() {
|
||||||
if full && !dep.lto.FullLTO() {
|
if full && !dep.lto.FullLTO() {
|
||||||
dep.lto.Properties.FullDep = true
|
dep.lto.Properties.FullDep = true
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user