Remove implementation_deps from cc_library headers
Don't add implementation_deps to cc_library_headers in bp2build Fixes: 236404654 Test: unit tests, USE_MIXED_BUILDS=1 m Change-Id: I0f6a35c10284f261b6a8b7a4831655d5fa084977
This commit is contained in:
@@ -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,12 +116,8 @@ 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"`,
|
||||
"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": [],
|
||||
})`,
|
||||
}),
|
||||
},
|
||||
|
@@ -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,
|
||||
|
Reference in New Issue
Block a user