Previously, hidden API properties were only allowed on
bootclasspath_fragment and platform_bootclasspath module types. This
change allows them to be specified on java_sdk_library modules too. It
involves the following changes:
1. Add the properties to the java.Module.
2. Populate and provide a HiddenAPIPropertyInfo struct from
java_sdk_library modules.
3. Modify bootclasspath_fragment to merge information gathered from its
content libraries as if it was specified on the fragment itself.
Bug: 240406019
Test: m nothing
packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I64eb71c2039ddc14cf380689d0cec7ec221f5b88
All usages of HiddenAPIFlagFileProperties use it as the type of a
Hidden_api field. This change pushes the field inside the struct and
just embeds the struct inside the structs that need it making it
simpler and more consistent with how the HiddenApiPackageProperties
struct is used.
This is extracted as a separate change as while the change is simple
it does affect a lot of lines. Keeping it separate makes it easier to
review the changes.
Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I664453029574ef68dc5712f7bf137a1a6e78e864
In preparation for adding hidden API properties to individual
java_sdk_library modules this change refactors the handling of that
information.
1. Renames HiddenApiPackageProperties to HiddenAPIPackageProperties
to be consistent with other similar structs.
2. Creates a new HiddenAPIPropertyInfo struct to be used to provide
property derived information from one module to another. It includes
both flag files as well as the information about which packages are
used.
3. The HiddenAPIPropertyInfo is embedded within the existing
HiddenAPIFlagInput in place of the existing flag files field.
4. The fields in the HiddenAPIPropertyInfo struct are populated from
the HiddenAPI*Properties structs.
5. Access to package information is retrieved from the info struct
instead of directly from the properties. That means that no changes
will be needed to this code when info from other modules is merged
into the struct in a follow up change.
Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
# Ran the previous command with and without this change to make
# sure that this change does not change the sdk snapshot
# contents.
Change-Id: I773279a4b621bcc3c40e3bfe193f2c7b0caeccd6
Previously, there were two separate fields for each of the API and
removed API files because in some cases it needed a WritablePath and in
other cases it could only be a Path.
This change refactors the code so that the WritablePath is no longer
needed, the duplicate fields deleted and the remaining field is changed
to Path. It also removes a few unused fields.
Bug: 234113632
Test: m nothing
Change-Id: If81f5fe2aa05d9d7b2bc23869fdb2397649d67b3
The majority of libcore NewApi warnings come from references to new
methods, constants, fields added in a file and then referenced in the
same source file. Maintaining suppressions is not scalable: they need
to work across multiple API versions in different branches.
Bug: 208656169
Test: TH
Change-Id: If5e746f25f1bd34931ee8c89b363aa92c81e23b3
Apply ThinLTO without optimization (--lto-O0) globally. This saves us
2.24% in binary size for system/lib64, as well as more than 4.68% build
time improvement.
Test: presubmit
Bug: 169004486
Change-Id: I1ed90c2058f9ff1fa8a2d3fd7ac1191c5d98dac1
Due to the lack of engineering efforts into LP32 targets, do not enable
global ThinLTO for them by default.
Test: presubmit
Bug: 169004486
Change-Id: I79b77baecf16fda95ff5dccc5a401596a0557d5d
Multiple modules (e.g. java, cc, python, rust) define the `test_options`
field. Extract the common properties in test_options to share across
different test rules.
Bug: 240928948
Test: `refreshmod` and diff with original module-info.json
Change-Id: I404a7a157b4ccaa53d800ee2217559ff695bd825
This reverts commit c166b68589.
Bug: 234113632
Bug: 236187167
Reason for revert: causes problems with update-api, see b/236187167
Change-Id: I4c88151cb5e2c86bb6c1a955c5065966a4fbb3e0
* Old compilers look up lib64/libc++.so.1
* New compilers look up lib/libc++.so.1
Bug: 241836377
Test: lunch sdk-userdebug; make sdk_repo
Change-Id: I90e7df9875594a1257e582ef62bac5084f0f939d
* When copy to an $out file, a symlink can become a dangling link.
* The following chmod +x will fail with a dangling link.
Bug: 241815504
Test: presubmit builds
Change-Id: Ic3dd9d41376a94381981fb973b41a1650f5ac946
Pass --apply-suggestions to lint, which will cause it to apply
suggested fixes to the source files in the sandbox. Zip up the
modified sources and export them outside the sandbox.
Test: examine suggested-fixes.zip
Bug: 216456886
Change-Id: Iaeb406462c38cf4b10e51d641432ba1fda9327fa
Accept duplicate file inputs in soong_zip when they are the same
source file. This came up when trying to zip lint srcs, as some
java modules have duplicate source files that seem to be ignored
by javac.
Test: TestZip
Bug: 216456886
Change-Id: I8c43df9aded8cf094afaed79cca2b9eb091cc861
Instead of a StringListAttribute of length 1,
introduce a more appropriately reduced StringAttribute
so that e.g. `select`s work properly
Test: new cases in TestGenerateBazelTargetModules
Change-Id: I0ae0e4a51e39f85caf55b0d00459222ede6de79c
* New flags cannot be added before llvm_android
has a new version.
Bug: 241941550
Bug: 241601211
Test: presubmit
Change-Id: Ibab8cfa9129eac824a3d5fb9c3124ba807ba4245