Loading cc/cc.go +2 −2 Original line number Diff line number Diff line Loading @@ -1135,9 +1135,9 @@ func (c *Module) IsLlndkLibrary() bool { return false } func (m *Module) HasLlndkStubs() bool { func (m *Module) NeedsLlndkVariants() bool { lib := moduleLibraryInterface(m) return lib != nil && lib.hasLLNDKStubs() return lib != nil && (lib.hasLLNDKStubs() || lib.hasLLNDKHeaders()) } // isImplementationForLLNDKPublic returns true for any variant of a cc_library that has LLNDK stubs Loading cc/image.go +2 −2 Original line number Diff line number Diff line Loading @@ -437,13 +437,13 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) { productVndkVersion = platformVndkVersion } if m.IsLlndkLibrary() || m.IsLlndkHeaders() || m.HasLlndkStubs() { if m.IsLlndkLibrary() || m.IsLlndkHeaders() || m.NeedsLlndkVariants() { // This is an LLNDK library. The implementation of the library will be on /system, // and vendor and product variants will be created with LLNDK stubs. // The LLNDK libraries need vendor variants even if there is no VNDK. // The obsolete llndk_library and llndk_headers modules also need the vendor variants // so the cc_library LLNDK stubs can depend on them. if m.HasLlndkStubs() { if m.NeedsLlndkVariants() { coreVariantNeeded = true } if platformVndkVersion != "" { Loading cc/library.go +7 −0 Original line number Diff line number Diff line Loading @@ -868,6 +868,7 @@ type versionedInterface interface { implementationModuleName(name string) string hasLLNDKStubs() bool hasLLNDKHeaders() bool } var _ libraryInterface = (*libraryDecorator)(nil) Loading Loading @@ -1682,6 +1683,12 @@ func (library *libraryDecorator) hasVestigialLLNDKLibrary() bool { return String(library.Properties.Llndk_stubs) != "" } // hasLLNDKHeaders returns true if this cc_library module has a variant that provides headers // to a module that sets llndk.symbol_file. func (library *libraryDecorator) hasLLNDKHeaders() bool { return Bool(library.Properties.Llndk.Llndk_headers) } func (library *libraryDecorator) implementationModuleName(name string) string { return name } Loading cc/linkable.go +2 −2 Original line number Diff line number Diff line Loading @@ -112,8 +112,8 @@ type LinkableInterface interface { // IsLlndkLibrary returns true if this module is an LLNDK library module. IsLlndkLibrary() bool // HasLlndkStubs returns true if this module has LLNDK stubs. HasLlndkStubs() bool // NeedsLlndkVariants returns true if this module has LLNDK stubs or provides LLNDK headers. NeedsLlndkVariants() bool UseVndk() bool MustUseVendorVariant() bool Loading cc/llndk_library.go +4 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,10 @@ type llndkLibraryProperties struct { // vendor nor product libraries. This effectively hides this module from // non-system modules. Default value is false. Private *bool // if true, make this module available to provide headers to other modules that set // llndk.symbol_file. Llndk_headers *bool } type llndkStubDecorator struct { Loading Loading
cc/cc.go +2 −2 Original line number Diff line number Diff line Loading @@ -1135,9 +1135,9 @@ func (c *Module) IsLlndkLibrary() bool { return false } func (m *Module) HasLlndkStubs() bool { func (m *Module) NeedsLlndkVariants() bool { lib := moduleLibraryInterface(m) return lib != nil && lib.hasLLNDKStubs() return lib != nil && (lib.hasLLNDKStubs() || lib.hasLLNDKHeaders()) } // isImplementationForLLNDKPublic returns true for any variant of a cc_library that has LLNDK stubs Loading
cc/image.go +2 −2 Original line number Diff line number Diff line Loading @@ -437,13 +437,13 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) { productVndkVersion = platformVndkVersion } if m.IsLlndkLibrary() || m.IsLlndkHeaders() || m.HasLlndkStubs() { if m.IsLlndkLibrary() || m.IsLlndkHeaders() || m.NeedsLlndkVariants() { // This is an LLNDK library. The implementation of the library will be on /system, // and vendor and product variants will be created with LLNDK stubs. // The LLNDK libraries need vendor variants even if there is no VNDK. // The obsolete llndk_library and llndk_headers modules also need the vendor variants // so the cc_library LLNDK stubs can depend on them. if m.HasLlndkStubs() { if m.NeedsLlndkVariants() { coreVariantNeeded = true } if platformVndkVersion != "" { Loading
cc/library.go +7 −0 Original line number Diff line number Diff line Loading @@ -868,6 +868,7 @@ type versionedInterface interface { implementationModuleName(name string) string hasLLNDKStubs() bool hasLLNDKHeaders() bool } var _ libraryInterface = (*libraryDecorator)(nil) Loading Loading @@ -1682,6 +1683,12 @@ func (library *libraryDecorator) hasVestigialLLNDKLibrary() bool { return String(library.Properties.Llndk_stubs) != "" } // hasLLNDKHeaders returns true if this cc_library module has a variant that provides headers // to a module that sets llndk.symbol_file. func (library *libraryDecorator) hasLLNDKHeaders() bool { return Bool(library.Properties.Llndk.Llndk_headers) } func (library *libraryDecorator) implementationModuleName(name string) string { return name } Loading
cc/linkable.go +2 −2 Original line number Diff line number Diff line Loading @@ -112,8 +112,8 @@ type LinkableInterface interface { // IsLlndkLibrary returns true if this module is an LLNDK library module. IsLlndkLibrary() bool // HasLlndkStubs returns true if this module has LLNDK stubs. HasLlndkStubs() bool // NeedsLlndkVariants returns true if this module has LLNDK stubs or provides LLNDK headers. NeedsLlndkVariants() bool UseVndk() bool MustUseVendorVariant() bool Loading
cc/llndk_library.go +4 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,10 @@ type llndkLibraryProperties struct { // vendor nor product libraries. This effectively hides this module from // non-system modules. Default value is false. Private *bool // if true, make this module available to provide headers to other modules that set // llndk.symbol_file. Llndk_headers *bool } type llndkStubDecorator struct { Loading