Support host platform cc builds

This involves handling of linux-* platforms (identifying them
appropriately as host), disabling unsupported Windows platform, and
denylisting of still-problematic modules.

Test: mixed_droid, with verification that shared library artifacts
originate from bazel-out

Change-Id: Ib52db49a2d2a3c1ff9b76af23fd4f22cfc9182d0
This commit is contained in:
Chris Parsons
2021-11-09 10:29:52 -05:00
committed by Christopher Parsons
parent aa1a9e4086
commit 494eef3dc8
3 changed files with 10 additions and 5 deletions

View File

@@ -188,6 +188,7 @@ var (
"packages/apps/QuickSearchBox":/* recursive = */ true,
"packages/apps/WallpaperPicker":/* recursive = */ false,
"prebuilts/gcc":/* recursive = */ true,
"prebuilts/sdk":/* recursive = */ false,
"prebuilts/sdk/current/extras/app-toolkit":/* recursive = */ false,
"prebuilts/sdk/current/support":/* recursive = */ false,
@@ -250,6 +251,8 @@ var (
// Per-module denylist to always opt modules out of both bp2build and mixed builds.
bp2buildModuleDoNotConvertList = []string{
"libprotobuf-cpp-full", "libprotobuf-cpp-lite", // Unsupported product&vendor suffix. b/204811222 and b/204810610.
"libc_malloc_debug", // depends on libunwindstack, which depends on unsupported module art_cc_library_statics
"libbase_ndk", // http://b/186826477, fails to link libctscamera2_jni for device (required for CtsCameraTestCases)
@@ -381,7 +384,11 @@ func ShouldKeepExistingBuildFileForDir(dir string) bool {
// MixedBuildsEnabled checks that a module is ready to be replaced by a
// converted or handcrafted Bazel target.
func (b *BazelModuleBase) MixedBuildsEnabled(ctx BazelConversionPathContext) bool {
func (b *BazelModuleBase) MixedBuildsEnabled(ctx ModuleContext) bool {
if ctx.Os() == Windows {
// Windows toolchains are not currently supported.
return false
}
if !ctx.Config().BazelContext.BazelEnabled() {
return false
}