Add bp2build converter for cc library stubs and use the stub library target of a library while linking it in APEXs.
Bug: 231322789
Test: with this CL on internal master,
1) b build --verbose_failures //vendor/google/modules/AdbdGoogle:com.google.android.adbd --config=android_x86_64
2) adb install bazel-bin/vendor/google/modules/AdbdGoogle/com.google.android.adbd.apex, and adbd is activated successfully on cuttlefish device.
3) m mts && mts-tradefed run mts-adbd, and there is no failure with cuttlefish device
4) packages/modules/adb/test_device.py, and there is no failure with cuttlefish device.
Change-Id: I81b6f5336cacf35c68957ae2dac65f985b6eafb9
diff --git a/android/allowlists/allowlists.go b/android/allowlists/allowlists.go
index 5c79fa2..08bad50 100644
--- a/android/allowlists/allowlists.go
+++ b/android/allowlists/allowlists.go
@@ -524,6 +524,24 @@
// '//bionic/libc:libc_bp2build_cc_library_static' is duplicated in the 'deps' attribute of rule
"toybox-static",
+
+ // Do not convert the following modules because of duplicate labels checking in Bazel.
+ // See b/241283350. They should be removed from this list once the bug is fixed.
+ "libartpalette",
+ "libartbase",
+ "libdexfile",
+ "libartbased",
+ "libdexfile_static",
+ "libartbase-testing",
+ "libartbased-testing",
+ "libdexfile_support",
+ "libunwindstack",
+ "libunwindstack_local",
+ "libfdtrack",
+ "libc_malloc_debug",
+ "libutilscallstack",
+ "libunwindstack_utils",
+ "unwind_for_offline",
}
Bp2buildCcLibraryStaticOnlyList = []string{}