Merge "Add support for prebuilts attribute to the bp2build APEX converter." am: 36a3ef297f
am: 5d80f5a189
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1781087 Change-Id: Ib5250493dd8f92befedd654d5dda1c517f6657d1
This commit is contained in:
commit
e317474f43
2 changed files with 26 additions and 0 deletions
|
@ -3139,6 +3139,7 @@ type bazelApexBundleAttributes struct {
|
|||
Installable bazel.BoolAttribute
|
||||
Native_shared_libs bazel.LabelListAttribute
|
||||
Binaries bazel.StringListAttribute
|
||||
Prebuilts bazel.LabelListAttribute
|
||||
}
|
||||
|
||||
type bazelApexBundle struct {
|
||||
|
@ -3204,6 +3205,10 @@ func apexBundleBp2BuildInternal(ctx android.TopDownMutatorContext, module *apexB
|
|||
nativeSharedLibsLabelList := android.BazelLabelForModuleDeps(ctx, nativeSharedLibs)
|
||||
nativeSharedLibsLabelListAttribute := bazel.MakeLabelListAttribute(nativeSharedLibsLabelList)
|
||||
|
||||
prebuilts := module.properties.Prebuilts
|
||||
prebuiltsLabelList := android.BazelLabelForModuleDeps(ctx, prebuilts)
|
||||
prebuiltsLabelListAttribute := bazel.MakeLabelListAttribute(prebuiltsLabelList)
|
||||
|
||||
binaries := module.properties.ApexNativeDependencies.Binaries
|
||||
binariesStringListAttribute := bazel.MakeStringListAttribute(binaries)
|
||||
|
||||
|
@ -3228,6 +3233,7 @@ func apexBundleBp2BuildInternal(ctx android.TopDownMutatorContext, module *apexB
|
|||
Installable: installableAttribute,
|
||||
Native_shared_libs: nativeSharedLibsLabelListAttribute,
|
||||
Binaries: binariesStringListAttribute,
|
||||
Prebuilts: prebuiltsLabelListAttribute,
|
||||
}
|
||||
|
||||
props := bazel.BazelTargetModuleProperties{
|
||||
|
|
|
@ -69,6 +69,18 @@ cc_library {
|
|||
bazel_module: { bp2build_available: false },
|
||||
}
|
||||
|
||||
// TODO(b/194878861): Add bp2build support for prebuilt_etc
|
||||
cc_library {
|
||||
name: "pretend_prebuilt_1",
|
||||
bazel_module: { bp2build_available: false },
|
||||
}
|
||||
|
||||
// TODO(b/194878861): Add bp2build support for prebuilt_etc
|
||||
cc_library {
|
||||
name: "pretend_prebuilt_2",
|
||||
bazel_module: { bp2build_available: false },
|
||||
}
|
||||
|
||||
filegroup {
|
||||
name: "com.android.apogee-file_contexts",
|
||||
srcs: [
|
||||
|
@ -95,6 +107,10 @@ apex {
|
|||
"binary_1",
|
||||
"binary_2",
|
||||
],
|
||||
prebuilts: [
|
||||
"pretend_prebuilt_1",
|
||||
"pretend_prebuilt_2",
|
||||
],
|
||||
}
|
||||
`,
|
||||
expectedBazelTargets: []string{`apex(
|
||||
|
@ -114,6 +130,10 @@ apex {
|
|||
":native_shared_lib_1",
|
||||
":native_shared_lib_2",
|
||||
],
|
||||
prebuilts = [
|
||||
":pretend_prebuilt_1",
|
||||
":pretend_prebuilt_2",
|
||||
],
|
||||
updatable = False,
|
||||
)`}})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue