summaryrefslogtreecommitdiff
path: root/apex/prebuilt.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2024-01-23 02:25:20 +0000
committer Spandan Das <spandandas@google.com> 2024-01-24 05:14:40 +0000
commit0b7089f13420061c8f1732fe6e2e56f1e9cdb21e (patch)
tree14afc10a9906e8ea5e01c01df9ff777cc1359e34 /apex/prebuilt.go
parentfbe572b06459d7d391a9a9c1dcf9051d531c8118 (diff)
Ensure sscp jars get copied to $OUT/soong/system_server_dexjars
(This was missed in aosp/2876756, which copied only the bcp jars) This hardcoded location is used by dex2oat to compile the dexpreopt artifacts. The copy rules are currently generated by java_(sdk)_library for source builds, and their prebuilt counterparts in prebuilt builds. After this change, the copy rule will be bifurcated between source and prebuilt builds 1. For source builds, it will come from java_(sdk)_library 2. For prebuilt builds, it will come from the top-level prebuilt apex. Since there can be multiple prebuilt apexes in trunk stable, HideFromMake will be used to determine which deapexed jar to copy. The bifurfaction is expected to be temporary. It is needed for now since the `apex_contributions` which will be used for source vs prebuilt selection have not been populated completely. Test: Added a unit test Test: Presubmits Test: git_master-art-host: art-gtest (https://android-build.corp.google.com/builds/abtd/run/L40800030001459791) Test: git_main:art_standalone_tests (https://android-build.corp.google.com/builds/abtd/run/L09000030001463855) Bug: 308790457 Change-Id: I3105d3b3a7e5c41cb601d07806f4ea483a61b50a
Diffstat (limited to 'apex/prebuilt.go')
-rw-r--r--apex/prebuilt.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/apex/prebuilt.go b/apex/prebuilt.go
index 1ec38eb94..dcf0fe2f8 100644
--- a/apex/prebuilt.go
+++ b/apex/prebuilt.go
@@ -201,6 +201,10 @@ func (p *prebuiltCommon) dexpreoptSystemServerJars(ctx android.ModuleContext) {
if !p.hasExportedDeps() {
return
}
+ // If this prebuilt apex has not been selected, return
+ if p.IsHideFromMake() {
+ return
+ }
// Use apex_name to determine the api domain of this prebuilt apex
apexName := p.ApexVariationName()
di, err := android.FindDeapexerProviderForModule(ctx)