bp2build: reference static variants directly
Previously, when referencing a cc_library as a static_lib from a converted module, the corresponding target would depend on the "root target" of that cc_library. This resulted in a superfluous dependency on the shared target of the cc_library dependency. This superfluous dependency could sometimes result in cycles. This change ensures the static target name is directly specified in such cases. Test: mixed_libc.sh CI Test: USE_BAZEL_ANALYSIS=1 m fmtlib Change-Id: I36ee9f0a9017b1e9d73df9e3174669107f0afd4f
This commit is contained in:
@@ -1022,18 +1022,18 @@ cc_library {
|
||||
}),
|
||||
implementation_deps = select({
|
||||
"//build/bazel/platforms/arch:arm": [],
|
||||
"//conditions:default": [":arm_static_lib_excludes"],
|
||||
"//conditions:default": [":arm_static_lib_excludes_bp2build_cc_library_static"],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte": [],
|
||||
"//conditions:default": [":malloc_not_svelte_static_lib_excludes"],
|
||||
"//conditions:default": [":malloc_not_svelte_static_lib_excludes_bp2build_cc_library_static"],
|
||||
}),
|
||||
srcs_c = ["common.c"],
|
||||
whole_archive_deps = select({
|
||||
"//build/bazel/platforms/arch:arm": [],
|
||||
"//conditions:default": [":arm_whole_static_lib_excludes"],
|
||||
"//conditions:default": [":arm_whole_static_lib_excludes_bp2build_cc_library_static"],
|
||||
}) + select({
|
||||
"//build/bazel/product_variables:malloc_not_svelte": [":malloc_not_svelte_whole_static_lib"],
|
||||
"//conditions:default": [":malloc_not_svelte_whole_static_lib_excludes"],
|
||||
"//build/bazel/product_variables:malloc_not_svelte": [":malloc_not_svelte_whole_static_lib_bp2build_cc_library_static"],
|
||||
"//conditions:default": [":malloc_not_svelte_whole_static_lib_excludes_bp2build_cc_library_static"],
|
||||
}),
|
||||
)`,
|
||||
},
|
||||
|
Reference in New Issue
Block a user