Commit Graph

35937 Commits

Author SHA1 Message Date
Paul Duffin
1081c7d85e Merge "Allow contents and image_name to be specified together" am: 3d14889c5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686066

Change-Id: Icf6a58e6b53d42fc9b5ae6d2c16a22ab27ff5ed9
2021-04-26 22:47:26 +00:00
Paul Duffin
3d14889c5b Merge "Allow contents and image_name to be specified together" 2021-04-26 22:03:51 +00:00
Matthew Maurer
3b9f1171d1 Merge "Enable overflow checks in Rust" am: 5fa13b8457
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1659257

Change-Id: If72f157302183cfd933642ac1b995c81cd84fbfd
2021-04-26 21:15:22 +00:00
Matthew Maurer
5fa13b8457 Merge "Enable overflow checks in Rust" 2021-04-26 20:46:21 +00:00
Paul Duffin
233f0ac8eb Extract java SdkMemberType instances as vars am: 2da0424b19
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686125

Change-Id: I4bed6a55aa11835f815f797a1e4ae6be7c49dda4
2021-04-26 20:27:34 +00:00
Paul Duffin
ceeb8949f9 Merge "Add coverage specific properties to bootclasspath_fragment" am: ef289f8853
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686065

Change-Id: I1bdb4e817a133eafa639ba015d9967af2e0fb04d
2021-04-26 20:26:31 +00:00
Paul Duffin
ba6afd0dba Allow contents and image_name to be specified together
Previously, only one of the contents or image_name properties could be
specified at once which meant that there was no way to create a
prebuilt which lists its fixed contents while at the same time allowing
it to check that that the contents matched what the build configuration
required.

e.g. a prebuilt_bootclasspath_fragment that had image_name: "art",
could not list its contents and also check that those contents matched
the ART_APEX_JARS which the build configuration required.

This change allows contents and image_name to be specified together and
adds a check to make sure that the contents are consistent with the
configuration appropriate to the image_name. The check is only
performed for modules that are active so that a
prebuilt_bootclasspath_fragment which was created without coverage
enabled (the default) would not cause a build failure in a coverage
build unless it was preferred.

Bug: 177892522
Test: m nothing
Change-Id: Ie601f29f707b3f6030fa7d252afa2c4826cc9f8e
2021-04-26 21:21:58 +01:00
Paul Duffin
2da0424b19 Extract java SdkMemberType instances as vars
This will allow them to be used from elsewhere in a follow up change.

Bug: 177892522
Test: m nothing
Change-Id: I60e94e148af5b1810aea7f724cba090b49ae758e
2021-04-26 21:21:58 +01:00
Paul Duffin
ef289f8853 Merge "Add coverage specific properties to bootclasspath_fragment" 2021-04-26 20:20:26 +00:00
Peter Collingbourne
18a53ad036 Merge "Don't print RBE stats if ANDROID_QUIET_BUILD is set." am: 19947656df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1682567

Change-Id: Ia7aa15282e137e4608e2f1657c068a62db87ec0b
2021-04-26 20:12:36 +00:00
Peter Collingbourne
19947656df Merge "Don't print RBE stats if ANDROID_QUIET_BUILD is set." 2021-04-26 19:47:58 +00:00
Lukács T. Berki
a373cd60e6 Merge "Reorganize and cull cc_library_static denylist." am: 2567d80414
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683872

Change-Id: I37a48a8486368019d9da34823e7b6c742a849bd0
2021-04-26 19:24:17 +00:00
Lukács T. Berki
2567d80414 Merge "Reorganize and cull cc_library_static denylist." 2021-04-26 19:08:04 +00:00
Lukacs T. Berki
cba7b0c43c Reorganize and cull cc_library_static denylist.
Test: Presubmits.
Change-Id: Ia82d5b6975fe53888798db0378635ec36b43603e
2021-04-26 18:54:28 +02:00
Paul Duffin
c7d1644b0b Add coverage specific properties to bootclasspath_fragment
This allows a bootclasspath_fragment (specifically the
art-bootclasspath-fragment) to specify additional contents to be
appended when coverage is enabled.

The art-bootclasspath-fragment will use this to add jacocoagent to its
contents to ensure that it is always consistent with the configuration.

Bug: 177892522
Test: m nothing
Change-Id: I50d05fe5e0e9b8c14bdf3dfd63bba0ac97e31d48
2021-04-26 17:22:28 +01:00
Paul Duffin
8745a28532 Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" am: 46e4a9e6b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686218

Change-Id: I735def0776d127c90fa1130ae65fd7ce8bdd5018
2021-04-26 16:19:09 +00:00
Paul Duffin
c73637a975 Merge "Extract bootclasspathFragment related code into separate functions" am: 9768678344
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686217

Change-Id: I6b3badd864efd11b5b32bff5ae57e6d6e80f1d02
2021-04-26 16:18:35 +00:00
Paul Duffin
8067ee44b3 Merge "Rename BootImageInfo to BootclasspathFragmentApexContentInfo" am: 71c84696f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686216

Change-Id: I0f529c8a2bf540941833aef162bc68e4b7997f61
2021-04-26 16:18:25 +00:00
Paul Duffin
5fd9799be6 Merge "Remove unused setting of BootImageInfo for platform_bootclasspath" am: 00b47c4a6e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686215

Change-Id: Iaba42502ca9bfed51bbba4c1fb83f00880df8fea
2021-04-26 16:17:45 +00:00
Paul Duffin
46e4a9e6b1 Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" 2021-04-26 16:12:45 +00:00
Paul Duffin
9768678344 Merge "Extract bootclasspathFragment related code into separate functions" 2021-04-26 16:12:33 +00:00
Paul Duffin
71c84696f9 Merge "Rename BootImageInfo to BootclasspathFragmentApexContentInfo" 2021-04-26 16:12:16 +00:00
Paul Duffin
00b47c4a6e Merge "Remove unused setting of BootImageInfo for platform_bootclasspath" 2021-04-26 15:42:29 +00:00
Rupert Shuttleworth
0190e56ad0 Add support for per-target exported includes. am: 375451edfe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686625

Change-Id: Ib1f14dba560f71314863a3a2a4fa148f4e952580
2021-04-26 13:28:58 +00:00
Rupert Shuttleworth
375451edfe Add support for per-target exported includes.
Test: Added unit test
Change-Id: I8ab58ddc73c15d5ec0f515e43407542bd4e8081a
2021-04-26 07:49:08 -04:00
Paul Duffin
190fdef294 Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment
The dex boot jar for the apex must have had hidden API flags encoded
into it. Currently, the hidden API processing is done within the java
modules themselves so the apex gets the dex boot jar from them.

However, as part of the hidden API modularization work the hidden API
encoding will be performed by the bootclasspath_fragment so this change
prepares for that by delegating the retrieval of the dex boot jars to
the bootclasspath_fragment, via BootclasspathFragmentApexContentInfo.

For the moment that simply delegates straight back to the java module
so this change does not change the build. It will however make it
easier to switch hidden API encoding to the bootclasspath_fragment in
future.

Bug: 179354495
Test: m com.android.art
      - verify that this change does not change its contents
Change-Id: I12eba333749be976bcc72661bb9d6be6cc3c56e3
2021-04-26 11:09:25 +01:00
Paul Duffin
cc33ec8838 Extract bootclasspathFragment related code into separate functions
The apexBundle.GenerateAndroidBuildActions is 400+ lines long which
makes it difficult to understand what is happening.

Bug: 177892522
Test: m com.android.art
      - verify that this change does not change its contents
Change-Id: I07cb31d246377869771bdb18fdc6291365adf399
2021-04-26 11:09:02 +01:00
Paul Duffin
e946b327f4 Rename BootImageInfo to BootclasspathFragmentApexContentInfo
Currently, it only contains ART boot image related information, i.e.
.art, .oat and .vdex files. However, follow up changes will extend that
to include other information from bootclasspath_fragment.

Bug: 177892522
Test: m nothing
Change-Id: I2b226131c0eccff0c739a18f265f90caa10a91d9
2021-04-26 10:05:27 +01:00
Vladimir Marko
cc48381c3d Merge "profman: Clean up output profile type options." am: fa64af9961
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685591

Change-Id: I7083474498adae60847de3ac894dcb5119d3b8cf
2021-04-26 07:59:30 +00:00
Vladimir Marko
fa64af9961 Merge "profman: Clean up output profile type options." 2021-04-26 07:34:21 +00:00
Paul Duffin
f13e07eee2 Remove unused setting of BootImageInfo for platform_bootclasspath
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
2021-04-25 21:38:14 +01:00
Paul Duffin
6e6281a34e Generate snapshot member list properties from dependencies am: cd06467124
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686074

Change-Id: I2d18bb75e49cd5fd0fffb5c13797d54b469afd58
2021-04-25 08:43:54 +00:00
Paul Duffin
68dc0a1210 Allow exporting of sdk members to be done per tag am: a720811c38
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686073

Change-Id: I3114b26470b1c38def7fa9eade78cd007724e942
2021-04-25 08:43:46 +00:00
Paul Duffin
b225bb759b Extract the os specific snapshot module properties handling am: 2d1bb89fe3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686072

Change-Id: Iee05c818fae5fc77e865a179789b5a33411117fe
2021-04-25 08:42:57 +00:00
Paul Duffin
cd06467124 Generate snapshot member list properties from dependencies
Previously, the snapshot member list properties were simply copied from
the sdk variants. That worked because the snapshot member list
properties must include all exported (i.e. visible outside the sdk
snaphot) members and only members explicitly specified in the sdk
member list properties were exported. However, a preceding change
allowed members that were transitively added (and so not explicitly
specified on the sdk) to be exported.

This change ensures that those exported members are added to the
snapshot member properties which means that they will now work properly
with the sdk version mutators.

This does not add tests for this because no existing SdkMemberType
exports its transitive dependencies and there is currently no way to
register an SdkMemberType for testing only. A following change will
exercise this functionality.

Bug: 186290299
Test: m nothing
Change-Id: Iadbdd86f6dcdd183fa99f647222a43d412271501
2021-04-24 22:33:04 +01:00
Paul Duffin
a720811c38 Allow exporting of sdk members to be done per tag
Previously, every module added to an sdk directly through one of the
SdkMemberType specific properties, e.g. java_libs, was exported and
every module added automatically via a transitive dependencies was not
exported. This change allows that behavior to be customized per tag.

Bug: 186290299
Test: m art-module-sdk
      - verify that this change does not affect its contents.
Change-Id: I563b5bcd823e61c23cdb706cfcbb13337963d550
2021-04-24 22:30:26 +01:00
Paul Duffin
2d1bb89fe3 Extract the os specific snapshot module properties handling
Previously, the code was inlined in the addSnapshotModule() method
which made it difficult to follow, did not have clear separation
between the different pieces and duplicated functionality. This
change combines the dynamic and static properties together and then
separates the processing into collation, optimization and property
set updating methods.

Bug: 186290299
Test: m nothing
Change-Id: I311eebca2337cb67634e63d71da12305f4370c07
2021-04-24 22:30:18 +01:00
Paul Duffin
8c42e9f650 Dedup snapshot module property set initialization am: fbe470e7d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686071

Change-Id: Ie9c182c6a56acba88230791c17c36ea037ec1a98
2021-04-24 20:29:05 +00:00
Paul Duffin
9d9413cfd2 Make order of properties in snapshot module consistent am: 7b0259ff62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686070

Change-Id: Ic478978caa9384930c2f0a2ea7200e39c79c8bdf
2021-04-24 20:29:03 +00:00
Paul Duffin
9edb677b70 Clarify behavior around handling of sdk members am: cc3132e496
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686069

Change-Id: Ia7e975678704bc659bb60beb8119f1df82a1c0a9
2021-04-24 20:29:00 +00:00
Paul Duffin
d8e1feefc8 Rename sdkMemberRef to sdkMemberVariantDep am: 2182726990
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686068

Change-Id: I5293f6149bd73e05e76a1ad8849103cc770a8e36
2021-04-24 20:28:56 +00:00
Paul Duffin
7efe12fb78 Extract addSnapshotModule from buildSnapshot am: 26197a65da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686067

Change-Id: If354ee73ccef284658c7592c83b0346076aff7ad
2021-04-24 20:28:25 +00:00
Paul Duffin
fbe470e7d3 Dedup snapshot module property set initialization
Previously, the code to add the compile_multilib property was
duplicated. This change moves the logic into the existing
addMemberPropertiesToPropertySet method, renames it to reflect new
behavior and renames and promotes the variantProperties struct from the
addSnapshotModule() method to the package level scope.

Bug: 186290299
Test: m nothing
Change-Id: I832a7fd89a3cf95467a1ff0807902c9be34c50b9
2021-04-24 16:50:47 +01:00
Paul Duffin
7b0259ff62 Make order of properties in snapshot module consistent
Previously the compile_multilib property was added after the member
list properties at the top level but before them in the target.os
level. This change makes it always be added before them.

Bug: 186290299
Test: m nothing
Change-Id: I01fe272933fd11f7f730cc379f60fb2ce70f2114
2021-04-24 16:50:47 +01:00
Paul Duffin
cc3132e496 Clarify behavior around handling of sdk members
Renames some types and adds some documentation to try and clarify how
the sdk handles the members.

Bug: 186290299
Test: m nothing
Change-Id: I4038276f5f4c473a96fe06aedc43050c90416877
2021-04-24 16:49:26 +01:00
Paul Duffin
2182726990 Rename sdkMemberRef to sdkMemberVariantDep
Previously, there were two types sdkMemberRef and sdkMember that seemed
as though the former was referring to the latter but that was not the
case. The former was actually information about the dependency the sdk
had on a specific member variant. The latter is all the information
about a specific member, including all its variants.

This change attempts to clarify that relationship, both through a
better type name and through some improved documentation.

Bug: 186290299
Test: m nothing
Change-Id: I1dcc0ddf3333da9e797bb23ae945d04729839014
2021-04-24 16:48:16 +01:00
Paul Duffin
26197a65da Extract addSnapshotModule from buildSnapshot
Bug: 186290299
Test: m nothing
Change-Id: I297d63366d71f692572e8e40f1e510b6e41859e6
2021-04-24 16:48:16 +01:00
Paul Duffin
aad12ec18f Merge "Check consistency of the BootJars/UpdatableBootJars config" am: 3b0c95b0e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683883

Change-Id: I952628e4666552d872ce05bfe59146bf3364280a
2021-04-24 09:12:53 +00:00
Paul Duffin
3b0c95b0e2 Merge "Check consistency of the BootJars/UpdatableBootJars config" 2021-04-24 08:54:27 +00:00
Paul Duffin
eb2abd05b9 Merge "Remove unused boot_image module type, prebuilt and sdk member type" am: 95661aab07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685590

Change-Id: I037abfe509e80e3ac69690bb063c86cf448f73a9
2021-04-23 22:34:44 +00:00