Commit Graph

36911 Commits

Author SHA1 Message Date
Paul Duffin
d905f6818a Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" am: 46e4a9e6b1 am: 8745a28532
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686218

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

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

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

Change-Id: I075f02fdbdeed17726654508e49256402619fe53
2021-04-26 16:37:25 +00: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
cb584b1731 Add support for per-target exported includes. am: 375451edfe am: 0190e56ad0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686625

Change-Id: Idc142124f8ce309fbfb3e0baa40e988b8f1ca9eb
2021-04-26 13:49: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
1560c68a3a Merge "profman: Clean up output profile type options." am: fa64af9961 am: cc48381c3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685591

Change-Id: Iaad70db39a2d21894c099123d3b04ecb604c9fc1
2021-04-26 08:20:50 +00: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
7aec6fa278 Generate snapshot member list properties from dependencies am: cd06467124 am: 6e6281a34e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686074

Change-Id: Idb937808816f414dde84b2a25184b0cf74ae7784
2021-04-25 09:02:12 +00:00
Paul Duffin
7cfcf56b07 Allow exporting of sdk members to be done per tag am: a720811c38 am: 68dc0a1210
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686073

Change-Id: I66b7b1f0c254e488e3d17353c5da69e8605b0717
2021-04-25 09:02:06 +00:00
Paul Duffin
18861e9fe4 Extract the os specific snapshot module properties handling am: 2d1bb89fe3 am: b225bb759b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686072

Change-Id: I3992b0ab4e0a11e82ef0af593139af5971c39c10
2021-04-25 09:01:56 +00: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
b908c63af2 Dedup snapshot module property set initialization am: fbe470e7d3 am: 8c42e9f650
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686071

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

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

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

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

Change-Id: I76cc6c7ba1dbd0a5d1054ba7c942285381b81ccd
2021-04-24 20:47:53 +00: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
53efd12d48 Merge "Check consistency of the BootJars/UpdatableBootJars config" am: 3b0c95b0e2 am: aad12ec18f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683883

Change-Id: I8e254f0328583556b6b304d089f246ed75071312
2021-04-24 09:36:36 +00: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
3aa522ece3 Merge "Remove unused boot_image module type, prebuilt and sdk member type" am: 95661aab07 am: eb2abd05b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685590

Change-Id: I0c618b0920c03bbed8d302be212818bf7fc0af44
2021-04-23 23:03:46 +00:00