Loading android/allowlists/allowlists.go +0 −9 Original line number Diff line number Diff line Loading @@ -736,15 +736,6 @@ var ( // the "prebuilt_" prefix to the name, so that it's differentiable from // the source versions within Soong's module graph. Bp2buildModuleDoNotConvertList = []string{ // TODO(b/250876486): Created cc_aidl_library doesn't have static libs from parent cc module "libgui_window_info_static", "libgui", // Depends on unconverted libgui_window_info_static "libdisplay", // Depends on uncovnerted libgui // Depends on unconverted libdisplay "libdvr_static.google", "libdvr.google", "libvrsensor", "dvr_api-test", // Depends on unconverted libandroid, libgui "dvr_buffer_queue-test", "dvr_display-test", Loading bp2build/cc_library_conversion_test.go +30 −15 Original line number Diff line number Diff line Loading @@ -3591,9 +3591,9 @@ cc_library { }) } func TestCcLibraryWithAidlAndSharedLibs(t *testing.T) { func TestCcLibraryWithAidlAndLibs(t *testing.T) { runCcLibraryTestCase(t, Bp2buildTestCase{ Description: "cc_aidl_library depends on shared libs from parent cc_library_static", Description: "cc_aidl_library depends on libs from parent cc_library_static", ModuleTypeUnderTest: "cc_library", ModuleTypeUnderTestFactory: cc.LibraryFactory, Blueprint: ` Loading @@ -3602,31 +3602,46 @@ cc_library_static { srcs: [ "Foo.aidl", ], static_libs: [ "bar-static", "baz-static", ], shared_libs: [ "bar", "baz", "bar-shared", "baz-shared", ], export_static_lib_headers: [ "baz-static", ], export_shared_lib_headers: [ "baz", "baz-shared", ], }` + simpleModuleDoNotConvertBp2build("cc_library", "bar") + simpleModuleDoNotConvertBp2build("cc_library", "baz"), simpleModuleDoNotConvertBp2build("cc_library_static", "bar-static") + simpleModuleDoNotConvertBp2build("cc_library_static", "baz-static") + simpleModuleDoNotConvertBp2build("cc_library", "bar-shared") + simpleModuleDoNotConvertBp2build("cc_library", "baz-shared"), ExpectedBazelTargets: []string{ MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{ "srcs": `["Foo.aidl"]`, }), MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{ "deps": `[":foo_aidl_library"]`, "implementation_deps": `[ ":baz-static", ":bar-static", ]`, "implementation_dynamic_deps": `[ ":baz", ":bar", ":baz-shared", ":bar-shared", ]`, }), MakeBazelTarget("cc_library_static", "foo", AttrNameToString{ "implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`, "dynamic_deps": `[":baz"]`, "implementation_dynamic_deps": `[":bar"]`, "deps": `[":baz-static"]`, "implementation_deps": `[":bar-static"]`, "dynamic_deps": `[":baz-shared"]`, "implementation_dynamic_deps": `[":bar-shared"]`, "local_includes": `["."]`, }), }, Loading cc/bp2build.go +8 −10 Original line number Diff line number Diff line Loading @@ -917,15 +917,12 @@ func bp2buildCcAidlLibrary( if !aidlLibs.IsEmpty() { ccAidlLibrarylabel := m.Name() + "_cc_aidl_library" // Since cc_aidl_library only needs the dynamic deps (aka shared libs) from the parent cc library for compiling, // we err on the side of not re-exporting the headers of the dynamic deps from cc_aidl_lirary // because the parent cc library already has all the dynamic deps implementationDynamicDeps := bazel.MakeLabelListAttribute( bazel.AppendBazelLabelLists( linkerAttrs.dynamicDeps.Value, linkerAttrs.implementationDynamicDeps.Value, ), ) // Since parent cc_library already has these dependencies, we can add them as implementation // deps so that they don't re-export implementationDeps := linkerAttrs.deps.Clone() implementationDeps.Append(linkerAttrs.implementationDeps) implementationDynamicDeps := linkerAttrs.dynamicDeps.Clone() implementationDynamicDeps.Append(linkerAttrs.implementationDynamicDeps) ctx.CreateBazelTargetModule( bazel.BazelTargetModuleProperties{ Loading @@ -935,7 +932,8 @@ func bp2buildCcAidlLibrary( android.CommonAttributes{Name: ccAidlLibrarylabel}, &ccAidlLibraryAttributes{ Deps: aidlLibs, Implementation_dynamic_deps: implementationDynamicDeps, Implementation_deps: *implementationDeps, Implementation_dynamic_deps: *implementationDynamicDeps, }, ) label := &bazel.LabelAttribute{ Loading cc/library.go +1 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,7 @@ type aidlLibraryAttributes struct { type ccAidlLibraryAttributes struct { Deps bazel.LabelListAttribute Implementation_deps bazel.LabelListAttribute Implementation_dynamic_deps bazel.LabelListAttribute } Loading Loading
android/allowlists/allowlists.go +0 −9 Original line number Diff line number Diff line Loading @@ -736,15 +736,6 @@ var ( // the "prebuilt_" prefix to the name, so that it's differentiable from // the source versions within Soong's module graph. Bp2buildModuleDoNotConvertList = []string{ // TODO(b/250876486): Created cc_aidl_library doesn't have static libs from parent cc module "libgui_window_info_static", "libgui", // Depends on unconverted libgui_window_info_static "libdisplay", // Depends on uncovnerted libgui // Depends on unconverted libdisplay "libdvr_static.google", "libdvr.google", "libvrsensor", "dvr_api-test", // Depends on unconverted libandroid, libgui "dvr_buffer_queue-test", "dvr_display-test", Loading
bp2build/cc_library_conversion_test.go +30 −15 Original line number Diff line number Diff line Loading @@ -3591,9 +3591,9 @@ cc_library { }) } func TestCcLibraryWithAidlAndSharedLibs(t *testing.T) { func TestCcLibraryWithAidlAndLibs(t *testing.T) { runCcLibraryTestCase(t, Bp2buildTestCase{ Description: "cc_aidl_library depends on shared libs from parent cc_library_static", Description: "cc_aidl_library depends on libs from parent cc_library_static", ModuleTypeUnderTest: "cc_library", ModuleTypeUnderTestFactory: cc.LibraryFactory, Blueprint: ` Loading @@ -3602,31 +3602,46 @@ cc_library_static { srcs: [ "Foo.aidl", ], static_libs: [ "bar-static", "baz-static", ], shared_libs: [ "bar", "baz", "bar-shared", "baz-shared", ], export_static_lib_headers: [ "baz-static", ], export_shared_lib_headers: [ "baz", "baz-shared", ], }` + simpleModuleDoNotConvertBp2build("cc_library", "bar") + simpleModuleDoNotConvertBp2build("cc_library", "baz"), simpleModuleDoNotConvertBp2build("cc_library_static", "bar-static") + simpleModuleDoNotConvertBp2build("cc_library_static", "baz-static") + simpleModuleDoNotConvertBp2build("cc_library", "bar-shared") + simpleModuleDoNotConvertBp2build("cc_library", "baz-shared"), ExpectedBazelTargets: []string{ MakeBazelTarget("aidl_library", "foo_aidl_library", AttrNameToString{ "srcs": `["Foo.aidl"]`, }), MakeBazelTarget("cc_aidl_library", "foo_cc_aidl_library", AttrNameToString{ "deps": `[":foo_aidl_library"]`, "implementation_deps": `[ ":baz-static", ":bar-static", ]`, "implementation_dynamic_deps": `[ ":baz", ":bar", ":baz-shared", ":bar-shared", ]`, }), MakeBazelTarget("cc_library_static", "foo", AttrNameToString{ "implementation_whole_archive_deps": `[":foo_cc_aidl_library"]`, "dynamic_deps": `[":baz"]`, "implementation_dynamic_deps": `[":bar"]`, "deps": `[":baz-static"]`, "implementation_deps": `[":bar-static"]`, "dynamic_deps": `[":baz-shared"]`, "implementation_dynamic_deps": `[":bar-shared"]`, "local_includes": `["."]`, }), }, Loading
cc/bp2build.go +8 −10 Original line number Diff line number Diff line Loading @@ -917,15 +917,12 @@ func bp2buildCcAidlLibrary( if !aidlLibs.IsEmpty() { ccAidlLibrarylabel := m.Name() + "_cc_aidl_library" // Since cc_aidl_library only needs the dynamic deps (aka shared libs) from the parent cc library for compiling, // we err on the side of not re-exporting the headers of the dynamic deps from cc_aidl_lirary // because the parent cc library already has all the dynamic deps implementationDynamicDeps := bazel.MakeLabelListAttribute( bazel.AppendBazelLabelLists( linkerAttrs.dynamicDeps.Value, linkerAttrs.implementationDynamicDeps.Value, ), ) // Since parent cc_library already has these dependencies, we can add them as implementation // deps so that they don't re-export implementationDeps := linkerAttrs.deps.Clone() implementationDeps.Append(linkerAttrs.implementationDeps) implementationDynamicDeps := linkerAttrs.dynamicDeps.Clone() implementationDynamicDeps.Append(linkerAttrs.implementationDynamicDeps) ctx.CreateBazelTargetModule( bazel.BazelTargetModuleProperties{ Loading @@ -935,7 +932,8 @@ func bp2buildCcAidlLibrary( android.CommonAttributes{Name: ccAidlLibrarylabel}, &ccAidlLibraryAttributes{ Deps: aidlLibs, Implementation_dynamic_deps: implementationDynamicDeps, Implementation_deps: *implementationDeps, Implementation_dynamic_deps: *implementationDynamicDeps, }, ) label := &bazel.LabelAttribute{ Loading
cc/library.go +1 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,7 @@ type aidlLibraryAttributes struct { type ccAidlLibraryAttributes struct { Deps bazel.LabelListAttribute Implementation_deps bazel.LabelListAttribute Implementation_dynamic_deps bazel.LabelListAttribute } Loading