Merge "Don't create version variants for SDK variants" am: 6116ffdcf5
am: 974d8be0ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1340033 Change-Id: I0f31d72d4f0a1792121000c653c67da0183217be
This commit is contained in:
commit
ced8c64073
4 changed files with 11 additions and 1 deletions
4
cc/cc.go
4
cc/cc.go
|
@ -3209,6 +3209,10 @@ func (c *Module) SetImageVariation(ctx android.BaseModuleContext, variant string
|
|||
}
|
||||
}
|
||||
|
||||
func (c *Module) IsSdkVariant() bool {
|
||||
return c.Properties.IsSdkVariant
|
||||
}
|
||||
|
||||
func getCurrentNdkPrebuiltVersion(ctx DepsContext) string {
|
||||
if ctx.Config().PlatformSdkVersionInt() > config.NdkMaxPrebuiltVersionInt {
|
||||
return strconv.Itoa(config.NdkMaxPrebuiltVersionInt)
|
||||
|
|
|
@ -1580,7 +1580,8 @@ func VersionVariantAvailable(module interface {
|
|||
// (which is unnamed) and zero or more stubs variants.
|
||||
func VersionMutator(mctx android.BottomUpMutatorContext) {
|
||||
if library, ok := mctx.Module().(LinkableInterface); ok && VersionVariantAvailable(library) {
|
||||
if library.CcLibrary() && library.BuildSharedVariant() && len(library.StubsVersions()) > 0 {
|
||||
if library.CcLibrary() && library.BuildSharedVariant() && len(library.StubsVersions()) > 0 &&
|
||||
!library.IsSdkVariant() {
|
||||
versions := library.StubsVersions()
|
||||
normalizeVersions(mctx, versions)
|
||||
if mctx.Failed() {
|
||||
|
|
|
@ -56,6 +56,7 @@ type LinkableInterface interface {
|
|||
|
||||
SdkVersion() string
|
||||
AlwaysSdk() bool
|
||||
IsSdkVariant() bool
|
||||
|
||||
ToolchainLibrary() bool
|
||||
NdkPrebuiltStl() bool
|
||||
|
|
|
@ -196,6 +196,10 @@ func (mod *Module) AlwaysSdk() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (mod *Module) IsSdkVariant() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (mod *Module) ToolchainLibrary() bool {
|
||||
return false
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue