diff options
author | 2024-11-04 15:56:34 -0800 | |
---|---|---|
committer | 2024-11-04 16:05:22 -0800 | |
commit | 4bc45d87db78b25ae7e71a17da4519dcf7b4da73 (patch) | |
tree | 104d965c5f57feb0a62ca2d73e8572f1baf8a180 /java/platform_bootclasspath.go | |
parent | bd44fd7e2ea1aa1cf672f4d15410c0eeeecb6350 (diff) |
Make platform_bootclasspath a regular module
It was only a singleton module in order to implement
SingletonMakeVarsProvider, but the one make var it exported is no longer
used.
Bug: 361816274
Test: m nothing --no-skip-soong-tests
Change-Id: I5fa627fa60a30de288c59b5e0342e1c606c7ad49
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r-- | java/platform_bootclasspath.go | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index acfc7745e..8b0ca97a1 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -24,7 +24,7 @@ func init() { } func registerPlatformBootclasspathBuildComponents(ctx android.RegistrationContext) { - ctx.RegisterParallelSingletonModuleType("platform_bootclasspath", platformBootclasspathFactory) + ctx.RegisterModuleType("platform_bootclasspath", platformBootclasspathFactory) } // The tags used for the dependencies between the platform bootclasspath and any configured boot @@ -37,7 +37,7 @@ var ( ) type platformBootclasspathModule struct { - android.SingletonModuleBase + android.ModuleBase ClasspathFragmentBase properties platformBootclasspathProperties @@ -64,7 +64,7 @@ type platformBootclasspathProperties struct { HiddenAPIFlagFileProperties } -func platformBootclasspathFactory() android.SingletonModule { +func platformBootclasspathFactory() android.Module { m := &platformBootclasspathModule{} m.AddProperties(&m.properties) initClasspathFragment(m, BOOTCLASSPATH) @@ -156,18 +156,6 @@ func addDependenciesOntoBootImageModules(ctx android.BottomUpMutatorContext, mod } } -// GenerateSingletonBuildActions does nothing and must never do anything. -// -// This module only implements android.SingletonModule so that it can implement -// android.SingletonMakeVarsProvider. -func (b *platformBootclasspathModule) GenerateSingletonBuildActions(android.SingletonContext) { - // Keep empty -} - -func (d *platformBootclasspathModule) MakeVars(ctx android.MakeVarsContext) { - d.generateHiddenApiMakeVars(ctx) -} - func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { // Gather all the dependencies from the art, platform, and apex boot jars. artModules := gatherApexModulePairDepsWithTag(ctx, platformBootclasspathArtBootJarDepTag) @@ -428,13 +416,3 @@ func (b *platformBootclasspathModule) buildRuleMergeCSV(ctx android.ModuleContex rule.Build(desc, desc) } - -// generateHiddenApiMakeVars generates make variables needed by hidden API related make rules, e.g. -// veridex and run-appcompat. -func (b *platformBootclasspathModule) generateHiddenApiMakeVars(ctx android.MakeVarsContext) { - if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { - return - } - // INTERNAL_PLATFORM_HIDDENAPI_FLAGS is used by Make rules in art/ and cts/. - ctx.Strict("INTERNAL_PLATFORM_HIDDENAPI_FLAGS", b.hiddenAPIFlagsCSV.String()) -} |