Soong generates libraries.txt files for vndk

These files were generated by Make. This is an effort to converting make
to soong.

These files are created under a known location: $SOONG_OUT_DIR/vndk
- llndk.libraries.txt
- vndksp.libraries.txt
- vndkcore.libraries.txt
- vndkprivate.libraries.txt
- vndkcorevariant.libraries.txt
- vndk.libraries.txt: merged all of above with tags

The last one is used by 'check-vndk-list'.
(See the topic)

Others will be packaged by VNDK APEX of current VNDK.
(This is not merged yet. After landing, a follow-up CL will be
followed.)

Bug: 141019581
Bug: 141450808
Test: m check-vndk-list
Change-Id: I9a24f6975bd4b226a94f61a13d43857dcdce6b88
This commit is contained in:
Jooyung Han
2019-10-22 19:32:18 +09:00
parent e23c63de21
commit 097087be53
4 changed files with 213 additions and 16 deletions

View File

@@ -215,6 +215,10 @@ type BaseProperties struct {
// Allows this module to use non-APEX version of libraries. Useful
// for building binaries that are started before APEXes are activated.
Bootstrap *bool
// Even if DeviceConfig().VndkUseCoreVariant() is set, this module must use vendor variant.
// see soong/cc/config/vndk.go
MustUseVendorVariant bool `blueprint:"mutated"`
}
type VendorProperties struct {
@@ -586,7 +590,7 @@ func (c *Module) isNdk() bool {
func (c *Module) isLlndk(config android.Config) bool {
// Returns true for both LLNDK (public) and LLNDK-private libs.
return inList(c.Name(), *llndkLibraries(config))
return inList(c.BaseModuleName(), *llndkLibraries(config))
}
func (c *Module) isLlndkPublic(config android.Config) bool {
@@ -596,7 +600,7 @@ func (c *Module) isLlndkPublic(config android.Config) bool {
func (c *Module) isVndkPrivate(config android.Config) bool {
// Returns true for LLNDK-private, VNDK-SP-private, and VNDK-core-private.
return inList(c.Name(), *vndkPrivateLibraries(config))
return inList(c.BaseModuleName(), *vndkPrivateLibraries(config))
}
func (c *Module) isVndk() bool {
@@ -639,7 +643,7 @@ func (c *Module) isVndkExt() bool {
}
func (c *Module) mustUseVendorVariant() bool {
return c.isVndkSp() || inList(c.Name(), config.VndkMustUseVendorVariantList)
return c.isVndkSp() || c.Properties.MustUseVendorVariant
}
func (c *Module) getVndkExtendsModuleName() string {
@@ -2113,7 +2117,6 @@ func (c *Module) header() bool {
}
func (c *Module) getMakeLinkType(actx android.ModuleContext) string {
name := actx.ModuleName()
if c.useVndk() {
if lib, ok := c.linker.(*llndkStubDecorator); ok {
if Bool(lib.Properties.Vendor_available) {
@@ -2135,7 +2138,7 @@ func (c *Module) getMakeLinkType(actx android.ModuleContext) string {
// TODO(b/114741097): use the correct ndk stl once build errors have been fixed
//family, link := getNdkStlFamilyAndLinkType(c)
//return fmt.Sprintf("native:ndk:%s:%s", family, link)
} else if inList(name, *vndkUsingCoreVariantLibraries(actx.Config())) {
} else if actx.DeviceConfig().VndkUseCoreVariant() && !c.mustUseVendorVariant() {
return "native:platform_vndk"
} else {
return "native:platform"