diff options
author | 2024-09-20 01:09:48 +0000 | |
---|---|---|
committer | 2024-09-20 23:47:36 +0000 | |
commit | 52c01a1897f68e93bacfb2d7500ecc31f3bd3c61 (patch) | |
tree | 19caf92fb9d205faaf2cfaf0684c400058a45919 /java/bootclasspath_fragment.go | |
parent | a326b320ab2b8b5cbad003571f3fccf1573b20a6 (diff) |
Remove internal deapexer module
The build ations will be created by the top-level apex.
Details
1. In GenerateAndroidBuildActions, do a graph walk to determine if the
apex has exported deps.
2. If there are exported deps, call the newly introduced `deapex`
function. This registers the build rules and returns a DeapexerInfo
object. This was previously provided by the internal deapexer
dependency.
3. Update `dexpreoptSystemServerJars and `provideApexExportsInfo` to use
the DeapexerInfo object from (2).
A lot of unit tests that relied on the legacy mechanism of deapexing
have been updated.
Test: go test ./apex
Test: lunch cf_x86_64_phone-next-userdebug (uses mainline prebuilts)
Test: verified no diff in file_list.txt
Bug: 368337090
Change-Id: I0edb681beccac4d2a9ceb73f9a506c081a8a96e0
Diffstat (limited to 'java/bootclasspath_fragment.go')
-rw-r--r-- | java/bootclasspath_fragment.go | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index fe4cc7685..4fcd40bd3 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -414,6 +414,12 @@ func (b *BootclasspathFragmentModule) DepIsInSameApex(ctx android.BaseModuleCont // Cross-cutting metadata dependencies are metadata. return false } + // Dependency to the bootclasspath fragment of another apex + // e.g. concsrypt-bootclasspath-fragment --> art-bootclasspath-fragment + if tag == bootclasspathFragmentDepTag { + return false + + } panic(fmt.Errorf("boot_image module %q should not have a dependency on %q via tag %s", b, dep, android.PrettyPrintTag(tag))) } @@ -1099,22 +1105,10 @@ func (module *PrebuiltBootclasspathFragmentModule) produceHiddenAPIOutput(ctx an return &output } +// DEPRECATED: this information is now generated in the context of the top level prebuilt apex. // produceBootImageProfile extracts the boot image profile from the APEX if available. func (module *PrebuiltBootclasspathFragmentModule) produceBootImageProfile(ctx android.ModuleContext) android.WritablePath { - // This module does not provide a boot image profile. - if module.getProfileProviderApex(ctx) == "" { - return nil - } - - di, err := android.FindDeapexerProviderForModule(ctx) - if err != nil { - // An error was found, possibly due to multiple apexes in the tree that export this library - // Defer the error till a client tries to call getProfilePath - module.profilePathErr = err - return nil // An error has been reported by FindDeapexerProviderForModule. - } - - return di.PrebuiltExportPath(ProfileInstallPathInApex) + return android.PathForModuleInstall(ctx, "intentionally_no_longer_supported") } func (b *PrebuiltBootclasspathFragmentModule) getProfilePath() android.Path { |