Add EarlyModuleContext for LoadHookContext

Make LoadHookContext embed a new EarlyModuleContext instead of
BaseModuleContext to reduce its API surface in preparation for
moving it to run during parsing instead of mutators.

Test: m checkbuild
Change-Id: I1cd3ff3b636e7e24991a9184d7521903473e505a
This commit is contained in:
Colin Cross
2019-12-30 18:43:07 -08:00
parent c481607536
commit 1184b647d5
7 changed files with 199 additions and 130 deletions

View File

@@ -375,7 +375,7 @@ func (module *SdkLibrary) sdkVersionForScope(apiScope apiScope) string {
}
// Get the sdk version for use when compiling the stubs library.
func (module *SdkLibrary) sdkVersionForStubsLibrary(mctx android.BaseModuleContext, apiScope apiScope) string {
func (module *SdkLibrary) sdkVersionForStubsLibrary(mctx android.LoadHookContext, apiScope apiScope) string {
sdkDep := decodeSdkDep(mctx, sdkContext(&module.Library))
if sdkDep.hasStandardLibs() {
// If building against a standard sdk then use the sdk version appropriate for the scope.