Merge "Remove llndk_headers" am: 09a2a2ce3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1687469 Change-Id: I79a595522332a3db95b41a02ed562c1527ca4165
This commit is contained in:
10
cc/cc.go
10
cc/cc.go
@@ -1121,13 +1121,6 @@ func (c *Module) IsLlndkPublic() bool {
|
|||||||
return c.VendorProperties.IsLLNDK && !c.VendorProperties.IsVNDKPrivate
|
return c.VendorProperties.IsLLNDK && !c.VendorProperties.IsVNDKPrivate
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Module) IsLlndkHeaders() bool {
|
|
||||||
if _, ok := c.linker.(*llndkHeadersDecorator); ok {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Module) IsLlndkLibrary() bool {
|
func (c *Module) IsLlndkLibrary() bool {
|
||||||
if _, ok := c.linker.(*llndkStubDecorator); ok {
|
if _, ok := c.linker.(*llndkStubDecorator); ok {
|
||||||
return true
|
return true
|
||||||
@@ -1608,8 +1601,7 @@ func (c *Module) setSubnameProperty(actx android.ModuleContext) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
llndk := c.IsLlndk()
|
llndk := c.IsLlndk()
|
||||||
_, llndkHeader := c.linker.(*llndkHeadersDecorator)
|
if llndk || (c.UseVndk() && c.HasNonSystemVariants()) {
|
||||||
if llndk || llndkHeader || (c.UseVndk() && c.HasNonSystemVariants()) {
|
|
||||||
// .vendor.{version} suffix is added for vendor variant or .product.{version} suffix is
|
// .vendor.{version} suffix is added for vendor variant or .product.{version} suffix is
|
||||||
// added for product variant only when we have vendor and product variants with core
|
// added for product variant only when we have vendor and product variants with core
|
||||||
// variant. The suffix is not added for vendor-only or product-only module.
|
// variant. The suffix is not added for vendor-only or product-only module.
|
||||||
|
@@ -557,8 +557,11 @@ func TestVndk(t *testing.T) {
|
|||||||
export_llndk_headers: ["libllndk_headers"],
|
export_llndk_headers: ["libllndk_headers"],
|
||||||
}
|
}
|
||||||
|
|
||||||
llndk_headers {
|
cc_library_headers {
|
||||||
name: "libllndk_headers",
|
name: "libllndk_headers",
|
||||||
|
llndk: {
|
||||||
|
llndk_headers: true,
|
||||||
|
},
|
||||||
export_include_dirs: ["include"],
|
export_include_dirs: ["include"],
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -903,8 +906,11 @@ func TestVndkWhenVndkVersionIsNotSet(t *testing.T) {
|
|||||||
export_llndk_headers: ["libllndk_headers"],
|
export_llndk_headers: ["libllndk_headers"],
|
||||||
}
|
}
|
||||||
|
|
||||||
llndk_headers {
|
cc_library_headers {
|
||||||
name: "libllndk_headers",
|
name: "libllndk_headers",
|
||||||
|
llndk: {
|
||||||
|
symbol_file: "libllndk.map.txt",
|
||||||
|
},
|
||||||
export_include_dirs: ["include"],
|
export_include_dirs: ["include"],
|
||||||
}
|
}
|
||||||
`)
|
`)
|
||||||
@@ -2920,17 +2926,19 @@ func TestEmbeddedLlndkLibrary(t *testing.T) {
|
|||||||
|
|
||||||
func TestLlndkHeaders(t *testing.T) {
|
func TestLlndkHeaders(t *testing.T) {
|
||||||
ctx := testCc(t, `
|
ctx := testCc(t, `
|
||||||
llndk_headers {
|
cc_library_headers {
|
||||||
name: "libllndk_headers",
|
name: "libllndk_headers",
|
||||||
export_include_dirs: ["my_include"],
|
export_include_dirs: ["my_include"],
|
||||||
}
|
llndk: {
|
||||||
llndk_library {
|
llndk_headers: true,
|
||||||
name: "libllndk.llndk",
|
},
|
||||||
export_llndk_headers: ["libllndk_headers"],
|
|
||||||
}
|
}
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "libllndk",
|
name: "libllndk",
|
||||||
llndk_stubs: "libllndk.llndk",
|
llndk: {
|
||||||
|
symbol_file: "libllndk.map.txt",
|
||||||
|
export_llndk_headers: ["libllndk_headers"],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_library {
|
cc_library {
|
||||||
|
@@ -437,7 +437,7 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
|||||||
productVndkVersion = platformVndkVersion
|
productVndkVersion = platformVndkVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
if m.IsLlndkLibrary() || m.IsLlndkHeaders() || m.NeedsLlndkVariants() {
|
if m.IsLlndkLibrary() || m.NeedsLlndkVariants() {
|
||||||
// This is an LLNDK library. The implementation of the library will be on /system,
|
// 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.
|
// and vendor and product variants will be created with LLNDK stubs.
|
||||||
// The LLNDK libraries need vendor variants even if there is no VNDK.
|
// The LLNDK libraries need vendor variants even if there is no VNDK.
|
||||||
|
@@ -106,9 +106,6 @@ type LinkableInterface interface {
|
|||||||
// IsLlndkPublic returns true only for LLNDK (public) libs.
|
// IsLlndkPublic returns true only for LLNDK (public) libs.
|
||||||
IsLlndkPublic() bool
|
IsLlndkPublic() bool
|
||||||
|
|
||||||
// IsLlndkHeaders returns true if this module is an LLNDK headers module.
|
|
||||||
IsLlndkHeaders() bool
|
|
||||||
|
|
||||||
// IsLlndkLibrary returns true if this module is an LLNDK library module.
|
// IsLlndkLibrary returns true if this module is an LLNDK library module.
|
||||||
IsLlndkLibrary() bool
|
IsLlndkLibrary() bool
|
||||||
|
|
||||||
|
@@ -166,40 +166,6 @@ func isVestigialLLNDKModule(m *Module) bool {
|
|||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
|
|
||||||
type llndkHeadersDecorator struct {
|
|
||||||
*libraryDecorator
|
|
||||||
}
|
|
||||||
|
|
||||||
func (llndk *llndkHeadersDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
|
|
||||||
deps.HeaderLibs = append(deps.HeaderLibs, llndk.Properties.Llndk.Export_llndk_headers...)
|
|
||||||
deps.ReexportHeaderLibHeaders = append(deps.ReexportHeaderLibHeaders,
|
|
||||||
llndk.Properties.Llndk.Export_llndk_headers...)
|
|
||||||
return deps
|
|
||||||
}
|
|
||||||
|
|
||||||
// llndk_headers contains a set of c/c++ llndk headers files which are imported
|
|
||||||
// by other soongs cc modules.
|
|
||||||
func llndkHeadersFactory() android.Module {
|
|
||||||
module, library := NewLibrary(android.DeviceSupported)
|
|
||||||
library.HeaderOnly()
|
|
||||||
module.stl = nil
|
|
||||||
module.sanitize = nil
|
|
||||||
|
|
||||||
decorator := &llndkHeadersDecorator{
|
|
||||||
libraryDecorator: library,
|
|
||||||
}
|
|
||||||
|
|
||||||
module.compiler = nil
|
|
||||||
module.linker = decorator
|
|
||||||
module.installer = nil
|
|
||||||
module.library = decorator
|
|
||||||
|
|
||||||
module.Init()
|
|
||||||
|
|
||||||
return module
|
|
||||||
}
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
android.RegisterModuleType("llndk_library", LlndkLibraryFactory)
|
android.RegisterModuleType("llndk_library", LlndkLibraryFactory)
|
||||||
android.RegisterModuleType("llndk_headers", llndkHeadersFactory)
|
|
||||||
}
|
}
|
||||||
|
@@ -569,7 +569,6 @@ var PrepareForTestWithCcBuildComponents = android.GroupFixturePreparers(
|
|||||||
ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
|
ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
|
||||||
ctx.RegisterModuleType("cc_test", TestFactory)
|
ctx.RegisterModuleType("cc_test", TestFactory)
|
||||||
ctx.RegisterModuleType("cc_test_library", TestLibraryFactory)
|
ctx.RegisterModuleType("cc_test_library", TestLibraryFactory)
|
||||||
ctx.RegisterModuleType("llndk_headers", llndkHeadersFactory)
|
|
||||||
ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory)
|
ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory)
|
||||||
ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
|
ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
|
||||||
|
|
||||||
@@ -686,7 +685,6 @@ func CreateTestContext(config android.Config) *android.TestContext {
|
|||||||
ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
|
ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
|
||||||
ctx.RegisterModuleType("cc_test", TestFactory)
|
ctx.RegisterModuleType("cc_test", TestFactory)
|
||||||
ctx.RegisterModuleType("cc_test_library", TestLibraryFactory)
|
ctx.RegisterModuleType("cc_test_library", TestLibraryFactory)
|
||||||
ctx.RegisterModuleType("llndk_headers", llndkHeadersFactory)
|
|
||||||
ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory)
|
ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory)
|
||||||
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
|
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
|
||||||
ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
|
ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
|
||||||
|
@@ -180,16 +180,13 @@ func isSnapshotAware(cfg android.DeviceConfig, m *Module, inProprietaryPath bool
|
|||||||
if _, ok := m.linker.(*kernelHeadersDecorator); ok {
|
if _, ok := m.linker.(*kernelHeadersDecorator); ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// skip llndk_library and llndk_headers which are backward compatible
|
// skip LLNDK libraries which are backward compatible
|
||||||
if m.IsLlndk() {
|
if m.IsLlndk() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if _, ok := m.linker.(*llndkStubDecorator); ok {
|
if _, ok := m.linker.(*llndkStubDecorator); ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if _, ok := m.linker.(*llndkHeadersDecorator); ok {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
if l, ok := m.linker.(snapshotLibraryInterface); ok {
|
if l, ok := m.linker.(snapshotLibraryInterface); ok {
|
||||||
|
@@ -262,10 +262,6 @@ func (c *Module) IsLlndkPublic() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) IsLlndkHeaders() bool {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Module) IsLlndkLibrary() bool {
|
func (m *Module) IsLlndkLibrary() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user