Loading apex/vndk.go +26 −18 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { } vndkVersion := ab.vndkVersion(mctx.DeviceConfig()) if vndkVersion != "" { apiLevel, err := android.ApiLevelFromUser(mctx, vndkVersion) if err != nil { mctx.PropertyErrorf("vndk_version", "%s", err.Error()) Loading @@ -81,11 +82,13 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { ab.Disable() } if proptools.String(ab.vndkProperties.Vndk_version) != "" && mctx.DeviceConfig().PlatformVndkVersion() != "" && apiLevel.GreaterThanOrEqualTo(android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())) { ab.Disable() } } } } func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*cc.Module); ok && cc.IsForVndkApex(mctx, m) { Loading @@ -94,6 +97,11 @@ func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if vndkVersion == "" { vndkVersion = mctx.DeviceConfig().PlatformVndkVersion() } if vndkVersion == "" { return } if vndkVersion == mctx.DeviceConfig().PlatformVndkVersion() { vndkVersion = "current" } else { Loading cc/androidmk.go +1 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries { entries.AddStrings("LOCAL_RUNTIME_LIBRARIES", c.Properties.AndroidMkRuntimeLibs...) } entries.SetString("LOCAL_SOONG_LINK_TYPE", c.makeLinkType) if c.UseVndk() { if c.InVendorOrProduct() { entries.SetBool("LOCAL_USE_VNDK", true) if c.IsVndk() && !c.static() { entries.SetString("LOCAL_SOONG_VNDK_VERSION", c.VndkVersion()) Loading cc/cc.go +1 −1 Original line number Diff line number Diff line Loading @@ -3785,7 +3785,7 @@ func (c *Module) Object() bool { } func GetMakeLinkType(actx android.ModuleContext, c LinkableInterface) string { if c.UseVndk() { if c.InVendorOrProduct() { if c.IsLlndk() { if !c.IsLlndkPublic() { return "native:vndk_private" Loading cc/library.go +12 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package cc import ( "fmt" "io" "log" "path/filepath" "regexp" "strconv" Loading Loading @@ -871,12 +872,18 @@ func (library *libraryDecorator) getLibNameHelper(baseModuleName string, inVendo func (library *libraryDecorator) getLibName(ctx BaseModuleContext) string { name := library.getLibNameHelper(ctx.baseModuleName(), ctx.inVendor(), ctx.inProduct()) // Replace name with VNDK ext as original lib only when VNDK is enabled if ctx.IsVndkExt() { if ctx.DeviceConfig().VndkVersion() != "" { // vndk-ext lib should have the same name with original lib ctx.VisitDirectDepsWithTag(vndkExtDepTag, func(module android.Module) { originalName := module.(*Module).outputFile.Path() name = strings.TrimSuffix(originalName.Base(), originalName.Ext()) }) } else { // TODO(b/320208784) : Suggest a solution for former VNDK-ext libraries before VNDK deprecation. log.Printf("VNDK Extension on module %s will not be available once VNDK is deprecated", ctx.baseModuleName()) } } if ctx.Host() && Bool(library.Properties.Unique_host_soname) { Loading Loading
apex/vndk.go +26 −18 Original line number Diff line number Diff line Loading @@ -65,6 +65,7 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { } vndkVersion := ab.vndkVersion(mctx.DeviceConfig()) if vndkVersion != "" { apiLevel, err := android.ApiLevelFromUser(mctx, vndkVersion) if err != nil { mctx.PropertyErrorf("vndk_version", "%s", err.Error()) Loading @@ -81,11 +82,13 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { ab.Disable() } if proptools.String(ab.vndkProperties.Vndk_version) != "" && mctx.DeviceConfig().PlatformVndkVersion() != "" && apiLevel.GreaterThanOrEqualTo(android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())) { ab.Disable() } } } } func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*cc.Module); ok && cc.IsForVndkApex(mctx, m) { Loading @@ -94,6 +97,11 @@ func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if vndkVersion == "" { vndkVersion = mctx.DeviceConfig().PlatformVndkVersion() } if vndkVersion == "" { return } if vndkVersion == mctx.DeviceConfig().PlatformVndkVersion() { vndkVersion = "current" } else { Loading
cc/androidmk.go +1 −1 Original line number Diff line number Diff line Loading @@ -105,7 +105,7 @@ func (c *Module) AndroidMkEntries() []android.AndroidMkEntries { entries.AddStrings("LOCAL_RUNTIME_LIBRARIES", c.Properties.AndroidMkRuntimeLibs...) } entries.SetString("LOCAL_SOONG_LINK_TYPE", c.makeLinkType) if c.UseVndk() { if c.InVendorOrProduct() { entries.SetBool("LOCAL_USE_VNDK", true) if c.IsVndk() && !c.static() { entries.SetString("LOCAL_SOONG_VNDK_VERSION", c.VndkVersion()) Loading
cc/cc.go +1 −1 Original line number Diff line number Diff line Loading @@ -3785,7 +3785,7 @@ func (c *Module) Object() bool { } func GetMakeLinkType(actx android.ModuleContext, c LinkableInterface) string { if c.UseVndk() { if c.InVendorOrProduct() { if c.IsLlndk() { if !c.IsLlndkPublic() { return "native:vndk_private" Loading
cc/library.go +12 −5 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package cc import ( "fmt" "io" "log" "path/filepath" "regexp" "strconv" Loading Loading @@ -871,12 +872,18 @@ func (library *libraryDecorator) getLibNameHelper(baseModuleName string, inVendo func (library *libraryDecorator) getLibName(ctx BaseModuleContext) string { name := library.getLibNameHelper(ctx.baseModuleName(), ctx.inVendor(), ctx.inProduct()) // Replace name with VNDK ext as original lib only when VNDK is enabled if ctx.IsVndkExt() { if ctx.DeviceConfig().VndkVersion() != "" { // vndk-ext lib should have the same name with original lib ctx.VisitDirectDepsWithTag(vndkExtDepTag, func(module android.Module) { originalName := module.(*Module).outputFile.Path() name = strings.TrimSuffix(originalName.Base(), originalName.Ext()) }) } else { // TODO(b/320208784) : Suggest a solution for former VNDK-ext libraries before VNDK deprecation. log.Printf("VNDK Extension on module %s will not be available once VNDK is deprecated", ctx.baseModuleName()) } } if ctx.Host() && Bool(library.Properties.Unique_host_soname) { Loading