Merge "Remove implementation_deps from cc_library headers" am: 2923fa8bcf

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2127884

Change-Id: If994a03411e58f4bec5815735917b0a226ad5085
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Trevor Radcliffe 2022-06-22 15:03:22 +00:00 committed by Automerger Merge Worker
commit 073217461d
2 changed files with 24 additions and 29 deletions

View file

@ -83,18 +83,6 @@ func TestCcLibraryHeadersSimple(t *testing.T) {
"arch_x86_64_exported_include_dir/c.h": "",
},
blueprint: soongCcLibraryHeadersPreamble + `
cc_library_headers {
name: "lib-1",
export_include_dirs: ["lib-1"],
bazel_module: { bp2build_available: false },
}
cc_library_headers {
name: "lib-2",
export_include_dirs: ["lib-2"],
bazel_module: { bp2build_available: false },
}
cc_library_headers {
name: "foo_headers",
export_include_dirs: ["dir-1", "dir-2"],
@ -128,10 +116,6 @@ cc_library_headers {
"//build/bazel/platforms/arch:x86_64": ["arch_x86_64_exported_include_dir"],
"//conditions:default": [],
})`,
"implementation_deps": `[
":lib-1",
":lib-2",
]`,
"sdk_version": `"current"`,
"min_sdk_version": `"29"`,
}),
@ -173,18 +157,34 @@ cc_library_headers {
cc_library_headers {
name: "foo_headers",
header_libs: ["base-lib"],
export_header_lib_headers: ["base-lib"],
target: {
android: { header_libs: ["android-lib"] },
darwin: { header_libs: ["darwin-lib"] },
linux_bionic: { header_libs: ["linux_bionic-lib"] },
linux_glibc: { header_libs: ["linux-lib"] },
windows: { header_libs: ["windows-lib"] },
android: {
header_libs: ["android-lib"],
export_header_lib_headers: ["android-lib"],
},
darwin: {
header_libs: ["darwin-lib"],
export_header_lib_headers: ["darwin-lib"],
},
linux_bionic: {
header_libs: ["linux_bionic-lib"],
export_header_lib_headers: ["linux_bionic-lib"],
},
linux_glibc: {
header_libs: ["linux-lib"],
export_header_lib_headers: ["linux-lib"],
},
windows: {
header_libs: ["windows-lib"],
export_header_lib_headers: ["windows-lib"],
},
},
include_build_directory: false,
}`,
expectedBazelTargets: []string{
makeBazelTarget("cc_library_headers", "foo_headers", attrNameToString{
"implementation_deps": `[":base-lib"] + select({
"deps": `[":base-lib"] + select({
"//build/bazel/platforms/os:android": [":android-lib"],
"//build/bazel/platforms/os:darwin": [":darwin-lib"],
"//build/bazel/platforms/os:linux": [":linux-lib"],
@ -227,10 +227,6 @@ cc_library_headers {
"deps": `select({
"//build/bazel/platforms/os:android": [":exported-lib"],
"//conditions:default": [],
})`,
"implementation_deps": `select({
"//build/bazel/platforms/os:android": [":android-lib"],
"//conditions:default": [],
})`,
}),
},

View file

@ -130,7 +130,6 @@ func libraryHeadersBp2Build(ctx android.TopDownMutatorContext, module *Module) {
Export_includes: exportedIncludes.Includes,
Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
Export_system_includes: exportedIncludes.SystemIncludes,
Implementation_deps: linkerAttrs.implementationDeps,
Deps: linkerAttrs.deps,
System_dynamic_deps: linkerAttrs.systemDynamicDeps,
Hdrs: baseAttributes.hdrs,