diff options
author | Artur Satayev <satayev@google.com> | 2021-04-07 15:17:14 +0100 |
---|---|---|
committer | Artur Satayev <satayev@google.com> | 2021-04-14 15:03:23 +0100 |
commit | 97259dc62549cecddfb2f1d8872a3caa3433a450 (patch) | |
tree | fda02ae45282e37c55e233b3315ec3a13d7d4481 /java/platform_bootclasspath.go | |
parent | 21fb92d7f6f033f556c5270c702bbcab80c861c1 (diff) |
Generate classpaths.proto config for *CLASSPATH variables.
Instead of embedding "raw" values from PRODUCT_*_CLASSPATH variables
into /etc/classpath, encode them into classpaths.proto binary format.
Existing platform_bootclasspath{} module is used to generate the whole
monolithic config to begin with. Later, the config will be split
among individual bootclasspath_fragment and
systemserverclasspath_fragment modules.
Bug: 180105615
Test: m && launch_cvd
Change-Id: Ia66f521f8976ff78a62ecf91131d26db21064de7
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r-- | java/platform_bootclasspath.go | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index d98ce6719..6f242a149 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -59,6 +59,7 @@ var _ android.ExcludeFromVisibilityEnforcementTag = platformBootclasspathDepende type platformBootclasspathModule struct { android.ModuleBase + ClasspathFragmentBase properties platformBootclasspathProperties @@ -105,22 +106,23 @@ type platformBootclasspathProperties struct { func platformBootclasspathFactory() android.Module { m := &platformBootclasspathModule{} m.AddProperties(&m.properties) + // TODO(satayev): split systemserver and apex jars into separate configs. + initClasspathFragment(m) android.InitAndroidArchModule(m, android.DeviceSupported, android.MultilibCommon) return m } var _ android.OutputFileProducer = (*platformBootclasspathModule)(nil) -// A minimal AndroidMkEntries is needed in order to support the dists property. -func (b *platformBootclasspathModule) AndroidMkEntries() []android.AndroidMkEntries { - return []android.AndroidMkEntries{ - { - Class: "FAKE", - // Need at least one output file in order for this to take effect. - OutputFile: android.OptionalPathForPath(b.hiddenAPIFlagsCSV), - Include: "$(BUILD_PHONY_PACKAGE)", - }, - } +func (b *platformBootclasspathModule) AndroidMkEntries() (entries []android.AndroidMkEntries) { + entries = append(entries, android.AndroidMkEntries{ + Class: "FAKE", + // Need at least one output file in order for this to take effect. + OutputFile: android.OptionalPathForPath(b.hiddenAPIFlagsCSV), + Include: "$(BUILD_PHONY_PACKAGE)", + }) + entries = append(entries, b.classpathFragmentBase().getAndroidMkEntries()...) + return } // Make the hidden API files available from the platform-bootclasspath module. @@ -222,6 +224,8 @@ func addDependenciesOntoBootImageModules(ctx android.BottomUpMutatorContext, mod } func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { + b.classpathFragmentBase().generateAndroidBuildActions(ctx) + ctx.VisitDirectDepsIf(isActiveModule, func(module android.Module) { tag := ctx.OtherModuleDependencyTag(module) if tag == platformBootclasspathModuleDepTag { |