Encode default enabled state in OsType
Currently our only default-disabled Os is Windows since it's HostCross, but we'll be adding non-default Host and Device types in the future. Bug: 31559095 Test: out/soong/build.ninja is identical Change-Id: I2bc3a3cc76f2c95ea040bc34ba6706fcc178c68d
This commit is contained in:
@@ -355,7 +355,7 @@ func (a *ModuleBase) DeviceSupported() bool {
|
||||
|
||||
func (a *ModuleBase) Enabled() bool {
|
||||
if a.commonProperties.Enabled == nil {
|
||||
return a.Os().Class != HostCross
|
||||
return !a.Os().DefaultDisabled
|
||||
}
|
||||
return *a.commonProperties.Enabled
|
||||
}
|
||||
|
Reference in New Issue
Block a user