Merge "Make the IsSdkVariant field and method the same." am: 419117ee89
am: 288dc903aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1738338 Change-Id: If641ea419f7458f7650085404b64da4f041c05c9
This commit is contained in:
2
cc/cc.go
2
cc/cc.go
@@ -3381,7 +3381,7 @@ func DefaultsFactory(props ...interface{}) android.Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Module) IsSdkVariant() bool {
|
func (c *Module) IsSdkVariant() bool {
|
||||||
return c.Properties.IsSdkVariant || c.AlwaysSdk()
|
return c.Properties.IsSdkVariant
|
||||||
}
|
}
|
||||||
|
|
||||||
func kytheExtractAllFactory() android.Singleton {
|
func kytheExtractAllFactory() android.Singleton {
|
||||||
|
@@ -35,7 +35,8 @@ func sdkMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
if !m.UseSdk() && !m.SplitPerApiLevel() {
|
if !m.UseSdk() && !m.SplitPerApiLevel() {
|
||||||
ctx.ModuleErrorf("UseSdk() must return true when AlwaysSdk is set, did the factory forget to set Sdk_version?")
|
ctx.ModuleErrorf("UseSdk() must return true when AlwaysSdk is set, did the factory forget to set Sdk_version?")
|
||||||
}
|
}
|
||||||
ctx.CreateVariations("sdk")
|
modules := ctx.CreateVariations("sdk")
|
||||||
|
modules[0].(*Module).Properties.IsSdkVariant = true
|
||||||
} else if m.UseSdk() || m.SplitPerApiLevel() {
|
} else if m.UseSdk() || m.SplitPerApiLevel() {
|
||||||
modules := ctx.CreateVariations("", "sdk")
|
modules := ctx.CreateVariations("", "sdk")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user