Merge "Make init_rc property configurable" into main am: b33154033a am: a75c89fb81

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3266331

Change-Id: I137376f29caa4acf60064f99e48ab5d79dc5868f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Inseob Kim
2024-09-20 08:54:18 +00:00
committed by Automerger Merge Worker

View File

@@ -381,7 +381,7 @@ type commonProperties struct {
Native_bridge_supported *bool `android:"arch_variant"`
// init.rc files to be installed if this module is installed
Init_rc []string `android:"arch_variant,path"`
Init_rc proptools.Configurable[[]string] `android:"arch_variant,path"`
// VINTF manifest fragments to be installed if this module is installed
Vintf_fragments proptools.Configurable[[]string] `android:"path"`
@@ -1855,7 +1855,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext)
// so only a single rule is created for each init.rc or vintf fragment file.
if !m.InVendorRamdisk() {
ctx.initRcPaths = PathsForModuleSrc(ctx, m.commonProperties.Init_rc)
ctx.initRcPaths = PathsForModuleSrc(ctx, m.commonProperties.Init_rc.GetOrDefault(ctx, nil))
rcDir := PathForModuleInstall(ctx, "etc", "init")
for _, src := range ctx.initRcPaths {
installedInitRc := rcDir.Join(ctx, src.Base())