aboutsummaryrefslogtreecommitdiff
path: root/java/platform_bootclasspath.go
Commit message (Collapse)AuthorAgeFilesLines
...
* Move dumpOatRules to platform_bootclasspathPaul Duffin2021-04-291-0/+2
| | | | | | | | | | Bug: 177892522 Test: m oat-dump-boot - test output to make sure that this change does not change the generated files, at least no more than no changes do as the output from this rule is not deterministic. See b/186459873. Change-Id: Ib2b4203d9bb1fd0ee9443aee4e58b54b38b491cf
* Move generateUpdatableBcpPackagesRule to platform_bootclasspathPaul Duffin2021-04-291-2/+5
| | | | | | | | | | | | | Changes generateUpdatableBcpPackagesRule to use ModuleContext instead of SingletonContext and moves the call from dexpreoptBootJar's GenerateSingletonBuildActions method to platform_bootclasspath's GenerateAndroidBuildActions. Bug: 177892522 Test: lunch art_module_arm64 m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt - make sure it is not affected by this change Change-Id: I9741ae1eb9573cafe12dd7a17dc1d8449b224dc8
* Differentiate between art, non-updatable and updatable modulesPaul Duffin2021-04-291-10/+27
| | | | | | | | Bug: 177892522 Test: lunch art_module_arm64 m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt - make sure it is not affected by this change Change-Id: I3d35f1664cbbaba5df3f5809859dd9815a26d05d
* Extract logic to gather deps added for <apex>:<module> pairsPaul Duffin2021-04-291-8/+2
| | | | | | | | | | | | | | | Trades having to traverse a module's direct dependencies multiple times for reusable code. While at the minute the amount of duplicated code is small (checking a tag and appending to a list) follow up changes will modify the gatherApexModulePairDepsWithTag module to improve error reporting greatly increasing the benefit of deduping. The cost of traversing a module's direct dependencies is very small as there will be only a very few dependencies. Bug: 177892522 Test: m nothing Change-Id: I16389102abd8038e1bfa52b63f4153bdf92ff553
* Move bootFrameworkProfileRule to platform_bootclasspathPaul Duffin2021-04-281-3/+21
| | | | | | | | | | | | | | | | | Changes bootFrameworkProfileRule to use ModuleContext instead of SingletonContext and moves the call from dexpreoptBootJar's GenerateSingletonBuildActions method to platform_bootclasspath's GenerateAndroidBuildActions. Changing the context also allows the code to switch from bootFrameworkProfileRule to GetGlobalSoongConfig. Also extracts the shouldBuildBootImages function so it can be used by platform_bootclasspath to preserve the existing behavior. Bug: 177892522 Test: m droid Change-Id: I30d3ca10be7f84348ad3aa9cc984dd15b8f6f4e9
* Remove unused setting of BootImageInfo for platform_bootclasspathPaul Duffin2021-04-251-11/+0
| | | | | | | | | The BootImageInfo is used to populate an apex. A platform_bootclasspath module cannot be part of an apex so does not need to provide one. Bug: 177892522 Test: m nothing Change-Id: I1e1c4962d9d8106a12af80107c4c35828f54ff81
* Generalize the platformBootclasspathDepsMutatorPaul Duffin2021-04-231-20/+13
| | | | | | | | | | Adds a BootclasspathDepsMutator that is currently only implemented by the platform_bootclasspath but which can be implemented by bootclasspath_fragment too. Bug: 177892522 Test: m nothing Change-Id: Ibe35854281004d6e40bf1f797144fb582e8c08b9
* Extract general bootclasspath related code into java/bootclasspath.goPaul Duffin2021-04-231-106/+4
| | | | | | | | | | | | The platform_bootclasspath and bootclasspath_fragment modules provide different capabilities but are related and so have some common functionality. This change moves some platform_bootclasspath code that will be of use for bootclasspath_fragment in future into a separate file. Bug: 177892522 Test: m nothing Change-Id: I827b85e33d16155fcc920d553100c9e99267dc4e
* Move monolithic stub flags generation to platform_bootclasspathPaul Duffin2021-04-221-0/+26
| | | | | | | | | | | | | | | | As part of that this change: * Moves code that will be common to platform_bootclasspath and bootclasspath_fragment from hiddenapi_singleton.go into hiddenapi_modular.go. * Fixes the tests in hiddenapi_singleton_test.go but intentionally does not rename them or move them into a more appropriate place so as to make it easier to see the differences. A TODO has been added and these will be cleaned up in a follow up change. Bug: 179354495 Test: verified that the monolithic out/soong/hiddenapi/... files are unchanged by this change Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
* platform_bootclasspath: aggregate hidden API flag files from fragmentsPaul Duffin2021-04-161-4/+13
| | | | | | | | | | | | | Aggregates hidden API flag files from the bootclasspath_fragments which will allow the hidden API flag files in frameworks/base/boot/hiddenapi to be modularized and moved to the appropriate repo. Bug: 177892522 Test: verified that the out/soong/hiddenapi/... files are unchanged by this change also verified that changes to the fragment provided files do affect the monolithic files. Change-Id: Ifce14c9ef24c58c7ab1085475d85b61cfbfefecd
* Merge "Generate classpaths.proto config for *CLASSPATH variables."satayev2021-04-151-10/+14
|\
| * Generate classpaths.proto config for *CLASSPATH variables.Artur Satayev2021-04-141-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Rename hidden API types ..Augmentation.. to ..FlagFile..Paul Duffin2021-04-151-2/+2
| | | | | | | | | | | | | | | | Augmentation was too abstract this makes it clearer. Bug: 177892522 Test: m nothinge Change-Id: I60ad005e68d9e15b01bcb46bc6a9b7f84d8bfd43
* | Move hidden API metadata file rule to platform_bootclasspathPaul Duffin2021-04-141-0/+20
| | | | | | | | | | | | | | | | | | | | This change moves the monolithic hidden API index file creation rule from the hiddenAPISingleton into the platform_bootclasspath. Bug: 179354495 Test: verified that the out/soong/hiddenapi/... files are unchanged by this change Change-Id: Ib25be3618e30a83dc2929a18062eb58eefdabefb
* | Move hidden API index file rule to platform_bootclasspathPaul Duffin2021-04-141-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | This change moves the monolithic hidden API index file creation rule from the hiddenAPIIndexSingleton into the platform_bootclasspath. It also moves the corresponding test from java/hiddenapi_singleton_test.go to java/platform_bootclasspath_test.go. Bug: 179354495 Test: verified that the out/soong/hiddenapi/... files are unchanged by this change Change-Id: Ia295d0f7ae9b51ea816f16921aa42339ed91704e
* | Ensure boot jar modules have been initialized properly for hidden APIPaul Duffin2021-04-141-5/+25
| | | | | | | | | | | | | | | | | | | | Checks to make sure that every module that is part of the platform bootclasspath has been initialized property for hidden API processing. Bug: 177892522 Test: verified that the out/soong/hiddenapi/... files are unchanged by this change Change-Id: Ic4368963f2011784b537b8aebf5ef97ea22b2db5
* | prebuilt_apex created ApexInfo must not include prebuilt_ prefixPaul Duffin2021-04-131-1/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | As part of the work to modularize the hiddenAPI processing the generation of the monolithic hidden API index file needs to be moved to the platform_bootclasspath module type. Doing that broke the TestBootDexJarsFromSourcesAndPrebuilts tests which checks the inputs to the rule that creates that file. Fixing that required added a platform_bootclasspath module to the test fixture for those tests which highlighted an issue with the prebuilt_apex module. Previously, when the prebuilt_apex created apex variants it would use its own name as the apex variant name, even when that name included the prebuilt_ prefix. That broke the platform_bootclasspath logic as it was looking for apex variants for "myapex" but the only ones available were "prebuilt_myapex". This change ensures that it always uses the unprefixed name and fixes the TestNoUpdatableJarsInBootImage to match. This also adds some improved error reporting in platform_bootclasspath which helped debug this problem. Bug: 177892522 Test: m nothing Change-Id: I3e88b5cec767f77dcc0e94b3ae38b499d07eadf0
* Support UNSAFE_DISABLE_HIDDENAPI_FLAGS in platform_bootclasspathPaul Duffin2021-04-131-3/+17
| | | | | | | | | | | | | | | | Previously attempting to use m UNSAFE_DISABLE_HIDDENAPI_FLAGS would cause a build failure. It is necessary when UNSAFE_DISABLE_HIDDENAPI_FLAGS=true to create empty files for the monolithic files so that those usages which are not protected by the build flag, e.g. in dists or CTS tests like CtsHiddenApiBlocklistTestApiTestCases do not cause ninja failures due to reliance on a file that does not exist and has no rule to create it. Bug: 177892522 Test: m nothing m UNSAFE_DISABLE_HIDDENAPI_FLAGS=true CtsHiddenApiBlocklistTestApiTestCases Change-Id: I05d0b3680dbc0b5b7c7c0d792550faf848829647
* Remove noop code from generateHiddenAPIBuildActionsPaul Duffin2021-04-131-10/+4
| | | | | | | | | Change https://r.android.com/1673266 introduced some code that does nothing. This change removes that. Bug: 177892522 Test: m nothing Change-Id: I349b17c7fe7e2f68a807dab43a4300da7fe0ad4d
* Export monolithic hidden API files from platform_bootclasspathPaul Duffin2021-04-131-0/+50
| | | | | | | | | | | | | | | | | | | | | Makes the monolithic hidden API files accessible from the platform_bootclasspath so they can be output to the dist build target and used by other modules, e.g. by doing something like this: java_resources: [ ":platform-bootclasspath{hiddenapi-flags.csv}", ], It makes the paths relative to the out/soong/hiddenapi directory rather than the out/soong directory to make them easier to use in the java_resources property without changing the structure of the APK. Without that attempting to use them in a java_resources property will result in them being copied to a hiddenapi/ within the APK instead of being used at the top level as existing APKs like CtsHiddenApiBlocklistTestApiTestCases expect. Bug: 177892522 Test: m nothing Change-Id: I829412fc7d25411e0c2e0713d0d219a18f4af2ee
* Move generation of global hidden API flags to platform_bootclasspathPaul Duffin2021-04-121-1/+25
| | | | | | | | | | | | | | | | | | | This change moves the generation of the global hidden API flags from the singleton to the platform_bootclasspath module. It involves: 1. Moving the ruleToGenerateHiddenApiFlags to hiddenapi_modular.go. 2. Adding HiddenAPIAugmentationProperties to be used by the platform_bootclasspath type. 3. Moving the file paths into the platform-bootclasspath module definition in frameworks/base/boot/Android.bp. The flagsRule is kept as a placeholder for now. The emptyFlagsRule is also kept so that builds continue to work even when the frameworks/base repository is not present. Bug: 177892522 Test: verified that the out/soong/hiddenapi/... files are unchanged by this change Change-Id: Idf4dd414a016831bfe04a01f93234c1c33819881
* Allow platform_bootclasspath to specify contributing fragmentsPaul Duffin2021-04-081-0/+50
| | | | | | | | | Adds the fragments property to the platform_bootclasspath to allow the fragments that contribute to it to be specified. Bug: 177892522 Test: m nothing Change-Id: I14f83d9336f6984442c7315cc86dfdd0a0fd2d20
* Add dependencies from platform_bootclasspath to contentsPaul Duffin2021-04-081-0/+93
| | | | | | | | | | | | | | | Adds a FinalDeps mutator to add dependencies from the platform_bootclasspath to the configured boot jars which can be from either the platform or any apex. It adds dependencies for every configured boot jar, whether in ArtApexJars, BootJars or UpdatableBootJars. At the moment the dependencies are only used for testing purposes but following changes will make more use of them. Bug: 177892522 Test: m nothing Change-Id: I981305bf45bc20539a3d36987252f490e2b885cc
* Add a new platform_bootclasspath module typePaul Duffin2021-03-311-0/+74
Initially, this is just a placeholder but functionality will be added in follow up changes. Bug: 177892522 Test: m nothing Change-Id: I890b0d5a117c51a19c9ac5df98c766761d3aa16c