Merge "Allowlist additional com.android.runtime blockers"
This commit is contained in:
@@ -235,6 +235,7 @@ var (
|
|||||||
|
|
||||||
// Configure modules in these directories to enable bp2build_available: true or false by default.
|
// Configure modules in these directories to enable bp2build_available: true or false by default.
|
||||||
bp2buildDefaultConfig = Bp2BuildConfig{
|
bp2buildDefaultConfig = Bp2BuildConfig{
|
||||||
|
"art/libartpalette": Bp2BuildDefaultTrueRecursively,
|
||||||
"art/libdexfile": Bp2BuildDefaultTrueRecursively,
|
"art/libdexfile": Bp2BuildDefaultTrueRecursively,
|
||||||
"art/runtime": Bp2BuildDefaultTrueRecursively,
|
"art/runtime": Bp2BuildDefaultTrueRecursively,
|
||||||
"art/tools": Bp2BuildDefaultTrue,
|
"art/tools": Bp2BuildDefaultTrue,
|
||||||
@@ -296,6 +297,9 @@ var (
|
|||||||
"external/google-benchmark": Bp2BuildDefaultTrueRecursively,
|
"external/google-benchmark": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/googletest": Bp2BuildDefaultTrueRecursively,
|
"external/googletest": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/gwp_asan": Bp2BuildDefaultTrueRecursively,
|
"external/gwp_asan": Bp2BuildDefaultTrueRecursively,
|
||||||
|
"external/icu": Bp2BuildDefaultTrueRecursively,
|
||||||
|
"external/icu/android_icu4j": Bp2BuildDefaultFalse, // java rules incomplete
|
||||||
|
"external/icu/icu4j": Bp2BuildDefaultFalse, // java rules incomplete
|
||||||
"external/jemalloc_new": Bp2BuildDefaultTrueRecursively,
|
"external/jemalloc_new": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/jsoncpp": Bp2BuildDefaultTrueRecursively,
|
"external/jsoncpp": Bp2BuildDefaultTrueRecursively,
|
||||||
"external/libcap": Bp2BuildDefaultTrueRecursively,
|
"external/libcap": Bp2BuildDefaultTrueRecursively,
|
||||||
@@ -481,14 +485,27 @@ var (
|
|||||||
"libdexfiled", // depends on unconverted modules: dexfile_operator_srcs, libartbased, libartpalette
|
"libdexfiled", // depends on unconverted modules: dexfile_operator_srcs, libartbased, libartpalette
|
||||||
|
|
||||||
// go deps:
|
// go deps:
|
||||||
"apex-protos", // depends on soong_zip, a go binary
|
"apex-protos", // depends on soong_zip, a go binary
|
||||||
"robolectric_tzdata", // depends on soong_zip, a go binary
|
"generated_android_icu4j_src_files", "generated_android_icu4j_test_files", "icu4c_test_data", // depends on unconverted modules: soong_zip
|
||||||
"robolectric-sqlite4java-native", // depends on soong_zip, a go binary
|
|
||||||
"host_bionic_linker_asm", // depends on extract_linker, a go binary.
|
"host_bionic_linker_asm", // depends on extract_linker, a go binary.
|
||||||
"host_bionic_linker_script", // depends on extract_linker, a go binary.
|
"host_bionic_linker_script", // depends on extract_linker, a go binary.
|
||||||
|
"robolectric-sqlite4java-native", // depends on soong_zip, a go binary
|
||||||
|
"robolectric_tzdata", // depends on soong_zip, a go binary
|
||||||
|
|
||||||
|
"android_icu4j_srcgen_binary", // Bazel build error: deps not allowed without srcs; move to runtime_deps
|
||||||
|
"core-icu4j-for-host", // Bazel build error: deps not allowed without srcs; move to runtime_deps
|
||||||
|
|
||||||
// java deps
|
// java deps
|
||||||
"bin2c_fastdeployagent", // depends on deployagent, a java binary
|
"android_icu4j_srcgen", // depends on unconverted modules: currysrc
|
||||||
|
"currysrc", // depends on unconverted modules: currysrc_org.eclipse, guavalib, jopt-simple-4.9
|
||||||
|
"bin2c_fastdeployagent", // depends on unconverted module: deployagent
|
||||||
|
"timezone-host", // depends on unconverted modules: art.module.api.annotations
|
||||||
|
"robolectric-sqlite4java-0.282", // depends on unconverted modules: robolectric-sqlite4java-import, robolectric-sqlite4java-native
|
||||||
|
"truth-prebuilt", // depends on unconverted modules: asm-7.0, guava
|
||||||
|
"truth-host-prebuilt", // depends on unconverted modules: truth-prebuilt
|
||||||
|
|
||||||
|
"generated_android_icu4j_resources", // depends on unconverted modules: android_icu4j_srcgen_binary, soong_zip
|
||||||
|
"generated_android_icu4j_test_resources", // depends on unconverted modules: android_icu4j_srcgen_binary, soong_zip
|
||||||
}
|
}
|
||||||
|
|
||||||
// Per-module denylist of cc_library modules to only generate the static
|
// Per-module denylist of cc_library modules to only generate the static
|
||||||
|
@@ -844,10 +844,8 @@ func bp2BuildParseExportedIncludesHelper(ctx android.BazelConversionPathContext,
|
|||||||
|
|
||||||
func bazelLabelForStaticModule(ctx android.BazelConversionPathContext, m blueprint.Module) string {
|
func bazelLabelForStaticModule(ctx android.BazelConversionPathContext, m blueprint.Module) string {
|
||||||
label := android.BazelModuleLabel(ctx, m)
|
label := android.BazelModuleLabel(ctx, m)
|
||||||
if aModule, ok := m.(android.Module); ok {
|
if ccModule, ok := m.(*Module); ok && ccModule.typ() == fullLibrary && !android.GenerateCcLibraryStaticOnly(m.Name()) {
|
||||||
if ctx.OtherModuleType(aModule) == "cc_library" && !android.GenerateCcLibraryStaticOnly(m.Name()) {
|
label += "_bp2build_cc_library_static"
|
||||||
label += "_bp2build_cc_library_static"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return label
|
return label
|
||||||
}
|
}
|
||||||
|
82
cc/cc.go
82
cc/cc.go
@@ -1751,7 +1751,7 @@ func (c *Module) setSubnameProperty(actx android.ModuleContext) {
|
|||||||
// Returns true if Bazel was successfully used for the analysis of this module.
|
// Returns true if Bazel was successfully used for the analysis of this module.
|
||||||
func (c *Module) maybeGenerateBazelActions(actx android.ModuleContext) bool {
|
func (c *Module) maybeGenerateBazelActions(actx android.ModuleContext) bool {
|
||||||
var bazelModuleLabel string
|
var bazelModuleLabel string
|
||||||
if actx.ModuleType() == "cc_library" && c.static() {
|
if c.typ() == fullLibrary && c.static() {
|
||||||
// cc_library is a special case in bp2build; two targets are generated -- one for each
|
// cc_library is a special case in bp2build; two targets are generated -- one for each
|
||||||
// of the shared and static variants. The shared variant keeps the module name, but the
|
// of the shared and static variants. The shared variant keeps the module name, but the
|
||||||
// static variant uses a different suffixed name.
|
// static variant uses a different suffixed name.
|
||||||
@@ -1759,6 +1759,7 @@ func (c *Module) maybeGenerateBazelActions(actx android.ModuleContext) bool {
|
|||||||
} else {
|
} else {
|
||||||
bazelModuleLabel = c.GetBazelLabel(actx, c)
|
bazelModuleLabel = c.GetBazelLabel(actx, c)
|
||||||
}
|
}
|
||||||
|
|
||||||
bazelActionsUsed := false
|
bazelActionsUsed := false
|
||||||
// Mixed builds mode is disabled for modules outside of device OS.
|
// Mixed builds mode is disabled for modules outside of device OS.
|
||||||
// TODO(b/200841190): Support non-device OS in mixed builds.
|
// TODO(b/200841190): Support non-device OS in mixed builds.
|
||||||
@@ -3466,17 +3467,23 @@ func (c *Module) AlwaysRequiresPlatformApexVariant() bool {
|
|||||||
|
|
||||||
var _ snapshot.RelativeInstallPath = (*Module)(nil)
|
var _ snapshot.RelativeInstallPath = (*Module)(nil)
|
||||||
|
|
||||||
// ConvertWithBp2build converts Module to Bazel for bp2build.
|
type moduleType int
|
||||||
func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
|
||||||
prebuilt := c.IsPrebuilt()
|
const (
|
||||||
|
unknownType moduleType = iota
|
||||||
|
binary
|
||||||
|
object
|
||||||
|
fullLibrary
|
||||||
|
staticLibrary
|
||||||
|
sharedLibrary
|
||||||
|
headerLibrary
|
||||||
|
)
|
||||||
|
|
||||||
|
func (c *Module) typ() moduleType {
|
||||||
if c.Binary() {
|
if c.Binary() {
|
||||||
if !prebuilt {
|
return binary
|
||||||
binaryBp2build(ctx, c, ctx.ModuleType())
|
|
||||||
}
|
|
||||||
} else if c.Object() {
|
} else if c.Object() {
|
||||||
if !prebuilt {
|
return object
|
||||||
objectBp2Build(ctx, c)
|
|
||||||
}
|
|
||||||
} else if c.CcLibrary() {
|
} else if c.CcLibrary() {
|
||||||
static := false
|
static := false
|
||||||
shared := false
|
shared := false
|
||||||
@@ -3487,25 +3494,48 @@ func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
|||||||
static = library.MutatedProperties.BuildStatic
|
static = library.MutatedProperties.BuildStatic
|
||||||
shared = library.MutatedProperties.BuildShared
|
shared = library.MutatedProperties.BuildShared
|
||||||
}
|
}
|
||||||
|
|
||||||
if static && shared {
|
if static && shared {
|
||||||
if !prebuilt {
|
return fullLibrary
|
||||||
libraryBp2Build(ctx, c)
|
|
||||||
}
|
|
||||||
} else if !static && !shared {
|
} else if !static && !shared {
|
||||||
libraryHeadersBp2Build(ctx, c)
|
return headerLibrary
|
||||||
} else if static {
|
} else if static {
|
||||||
if prebuilt {
|
return staticLibrary
|
||||||
prebuiltLibraryStaticBp2Build(ctx, c)
|
}
|
||||||
} else {
|
return sharedLibrary
|
||||||
sharedOrStaticLibraryBp2Build(ctx, c, true)
|
}
|
||||||
}
|
return unknownType
|
||||||
} else if shared {
|
}
|
||||||
if prebuilt {
|
|
||||||
prebuiltLibrarySharedBp2Build(ctx, c)
|
// ConvertWithBp2build converts Module to Bazel for bp2build.
|
||||||
} else {
|
func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||||
sharedOrStaticLibraryBp2Build(ctx, c, false)
|
prebuilt := c.IsPrebuilt()
|
||||||
}
|
switch c.typ() {
|
||||||
|
case binary:
|
||||||
|
if !prebuilt {
|
||||||
|
binaryBp2build(ctx, c, ctx.ModuleType())
|
||||||
|
}
|
||||||
|
case object:
|
||||||
|
if !prebuilt {
|
||||||
|
objectBp2Build(ctx, c)
|
||||||
|
}
|
||||||
|
case fullLibrary:
|
||||||
|
if !prebuilt {
|
||||||
|
libraryBp2Build(ctx, c)
|
||||||
|
}
|
||||||
|
case headerLibrary:
|
||||||
|
libraryHeadersBp2Build(ctx, c)
|
||||||
|
case staticLibrary:
|
||||||
|
|
||||||
|
if prebuilt {
|
||||||
|
prebuiltLibraryStaticBp2Build(ctx, c)
|
||||||
|
} else {
|
||||||
|
sharedOrStaticLibraryBp2Build(ctx, c, true)
|
||||||
|
}
|
||||||
|
case sharedLibrary:
|
||||||
|
if prebuilt {
|
||||||
|
prebuiltLibrarySharedBp2Build(ctx, c)
|
||||||
|
} else {
|
||||||
|
sharedOrStaticLibraryBp2Build(ctx, c, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user