Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 553a31be authored by Colin Cross's avatar Colin Cross
Browse files

Support AllowMissingDependencies in prebuilt_apex modules

Arch-specfic prebuilt_apex modules may be missing prebuilts for new
architectures.  Mark the module as missing dependencies and allow
build analysis to continue when AllowMissingDependencies is set.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I79f0c20a0c9443fe443f9ed9bc846aa649f6b6a6
parent 1d487159
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -537,7 +537,11 @@ func (p *ApexFileProperties) prebuiltApexSelector(ctx android.BaseModuleContext,
	}

	if src == "" {
		if ctx.Config().AllowMissingDependencies() {
			ctx.AddMissingDependencies([]string{ctx.OtherModuleName(prebuilt)})
		} else {
			ctx.OtherModuleErrorf(prebuilt, "prebuilt_apex does not support %q", multiTargets[0].Arch.String())
		}
		// Drop through to return an empty string as the src (instead of nil) to avoid the prebuilt
		// logic from reporting a more general, less useful message.
	}