Commit Graph

4800 Commits

Author SHA1 Message Date
Paul Duffin
2dc665bb48 bootclasspath_fragment: Always output contents property in snapshot
Bug: 177892522
Test: m art-module-sdk
      - check generated snapshot contains contents property
Change-Id: I122dedba6600a199bfd83b01988da36ddfd09d63
2021-04-26 21:21:58 +01:00
Paul Duffin
e95b53a55d Automatically add bootclasspath_fragment contents to sdk
Previously, both a bootclasspath_fragment and its contents had to be
explicitly added to the sdk. This change means that adding a
bootclasspath_fragment to and sdk will automatically add its contents
as if they were added using java_boot_libs.

Bug: 177892522
Test: m nothing
Change-Id: I8f7e70649f272c9a109d4606571a2d12c44b7904
2021-04-26 21:21:58 +01: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
3f81c1c71c Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" am: 46e4a9e6b1 am: 8745a28532 am: d905f6818a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686218

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

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

Change-Id: Ie77a71113bb40ad6474b1f189f6751fc9ef7c8d9
2021-04-26 17:03:44 +00:00
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
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
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
46e4a9e6b1 Merge "Delegate retrieval of dex boot jar for apex to the bootclasspath_fragment" 2021-04-26 16:12:45 +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
Jeongik Cha
b19b58a015 Drop DexPreoptImages field in dexpreopt config
The field isn't used anymore.
And DexPreoptImagesDeps will have the slice of which size is the same as
Archs to avoid an error.

Bug: 158843648
Test: m
Change-Id: I520063ff7376811febbc82e1a0a43785feb5bbb2
2021-04-26 23:41:40 +09: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
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
ed4839ef89 Merge "profman: Clean up output profile type options." am: fa64af9961 am: cc48381c3d am: 1560c68a3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685591

Change-Id: I5f6d74f008e3b9f0855a30a6f02f3b4aae9b28b0
2021-04-26 08:45:28 +00: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
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
ff79fcac84 Allow exporting of sdk members to be done per tag am: a720811c38 am: 68dc0a1210 am: 7cfcf56b07
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686073

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

Change-Id: Ie8af346df2979b368130cde35047d5e54e6b7082
2021-04-23 23:38:46 +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
Paul Duffin
94993d5ce5 Rename BootImageModule to BootclasspathFragmentModule am: 7771eba88e am: 687425b0af am: 30b9c47cb7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685589

Change-Id: I1898516696beb6049ee1467832455dc1bfdab6f2
2021-04-23 18:57:27 +00:00
Paul Duffin
30b9c47cb7 Rename BootImageModule to BootclasspathFragmentModule am: 7771eba88e am: 687425b0af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685589

Change-Id: I1d09dee1f01774f83b0ca06da3bbab5a9c7f5fe2
2021-04-23 18:35:16 +00:00
Paul Duffin
d19f579cea Merge changes Ic32f02a6,Ibe358542 am: d5f8421afd am: e6e95f392a am: 3b7084417b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685586

Change-Id: Ic32a38e064ef652375c8a4da9ab7f9cb497f6da4
2021-04-23 16:38:00 +00:00
Jaewoong Jung
19ef691538 Merge "Fix minor issues in updatability lint CLs." am: 8811dcbb22 am: f623005952 am: ab6d61d1ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684886

Change-Id: Ie315db88ce15bdbca85c2647bd4a160696b21932
2021-04-23 16:37:53 +00:00
Paul Duffin
3b7084417b Merge changes Ic32f02a6,Ibe358542 am: d5f8421afd am: e6e95f392a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1685586

Change-Id: I4064c3f51a43583c2ccd4c6ea1ccfbcecc7eb545
2021-04-23 16:15:46 +00:00
Jaewoong Jung
ab6d61d1ea Merge "Fix minor issues in updatability lint CLs." am: 8811dcbb22 am: f623005952
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1684886

Change-Id: I461530dd340ebb05c10206f8a8b84598a2906ff6
2021-04-23 16:15:38 +00:00
Paul Duffin
8ab3f70cab Merge "Extract general bootclasspath related code into java/bootclasspath.go" am: fbe3a73d48 am: ec874c8232 am: 698629b21e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683884

Change-Id: I4048298a97763bcea925787907734ddf60034e92
2021-04-23 16:05:10 +00:00
Paul Duffin
df160eb463 Remove unused boot_image module type, prebuilt and sdk member type
Bug: 177892522
Test: m nothing
Change-Id: I5763b55992e4113506ae5ccdaf9865ee27d8b041
2021-04-23 17:00:26 +01:00
Paul Duffin
7771eba88e Rename BootImageModule to BootclasspathFragmentModule
Also renames files, tests, module types in a similar fashion.

There are still some references to image and boot image. They are kept
for the following reasons:
* image_name - this is the name of an ART boot image, i.e. the
  collection of .art/.oat/.vdex files.
* BootImageInfo - again this is related to the ART boot image.
* .../art_boot_images/... paths - ditto.

Bug: 177892522
Test: m nothing
Change-Id: Ie1f4738061d131fee75de48bc26a7601481bad4d
2021-04-23 16:59:26 +01:00
Paul Duffin
d5f8421afd Merge changes Ic32f02a6,Ibe358542
* changes:
  Export classesJars initialized in hiddenAPIExtractInformation
  Generalize the platformBootclasspathDepsMutator
2021-04-23 15:57:46 +00:00
Paul Duffin
698629b21e Merge "Extract general bootclasspath related code into java/bootclasspath.go" am: fbe3a73d48 am: ec874c8232
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683884

Change-Id: I73f3bdc0f529faa17d2917b21cc258920c5ed196
2021-04-23 15:43:24 +00:00
Treehugger Robot
0138a307a7 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." am: 784ad87dd6 am: ae5c25073c am: 9b4279d516
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670070

Change-Id: I3829855044e86b762464cef1ca299ea0be761287
2021-04-23 15:34:16 +00:00
Jaewoong Jung
8811dcbb22 Merge "Fix minor issues in updatability lint CLs." 2021-04-23 15:31:41 +00:00
Treehugger Robot
9b4279d516 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." am: 784ad87dd6 am: ae5c25073c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1670070

Change-Id: I7ee3c678a6efe7f94c3ce704bd1cae1bd2e78df1
2021-04-23 15:11:18 +00:00
Paul Duffin
fbe3a73d48 Merge "Extract general bootclasspath related code into java/bootclasspath.go" 2021-04-23 15:04:10 +00:00
Treehugger Robot
784ad87dd6 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." 2021-04-23 14:32:33 +00:00
Vladimir Marko
230bd421a8 profman: Clean up output profile type options.
Test: m  # Check output boot profiles with hexdump.
Bug: 148067697
Change-Id: Ic20f415ad4eee1fd6396f320b757420884764d2c
2021-04-23 15:19:16 +01:00
Paul Duffin
49358086fd Merge "Add exported_bootclasspath_fragments to prebuilt_apex/apex_set" am: ed0b64f65b am: 07b9400abb am: 7c1dda11a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683869

Change-Id: I696556aa85dd3d4ca01db854cae0df92f571f999
2021-04-23 14:02:39 +00:00
Paul Duffin
7c1dda11a6 Merge "Add exported_bootclasspath_fragments to prebuilt_apex/apex_set" am: ed0b64f65b am: 07b9400abb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1683869

Change-Id: Iab8bbbde2a28b760f746cba92adabc403392838b
2021-04-23 13:38:08 +00:00
Paul Duffin
023dba0a3f Add exported_bootclasspath_fragments to prebuilt_apex/apex_set
This is needed to allow a prebuilt_bootclasspath_fragment to be used
interchangeably with a bootclasspath_fragment in the
platform_bootclasspath module.

The platform_bootclasspath module depends on APEX specific variants of
bootclasspath_fragment modules. That works because the
bootclasspath_fragment modules are part of an apex and so have an APEX
specific variant which the platform_bootclasspath can specify.

Using a prebuilt_bootclasspath_fragment in place of a
bootclasspath_fragment requires that the prebuilt also has an APEX
specific variant.

Specifying exported_bootclasspath_fragments on a prebuilt_apex/apex_set
will cause it to create an APEX variant for the named module whcih will
allow it to be selected by the platform_bootclasspath module.

Bug: 186034565
Bug: 177892522
Test: m nothing
Change-Id: I7ddacc6498ec3a4a9f26c5f78b7f9a033e494d78
2021-04-23 12:12:37 +01:00
Paul Duffin
36187b2cf3 Export classesJars initialized in hiddenAPIExtractInformation
This exports classesJars constructed in hiddenAPIExtractInformation
through the hiddenAPIIntf interface for use by the
bootclasspath_fragment module type.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: Ic32f02a69229d9518772fe6b2a329501dd8cd849
2021-04-23 09:32:14 +01:00
Paul Duffin
b67d878b80 Extract general bootclasspath related code into java/bootclasspath.go
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
2021-04-23 09:32:14 +01:00
Paul Duffin
4994d26bfa Generalize the platformBootclasspathDepsMutator
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
2021-04-23 09:32:14 +01:00
Treehugger Robot
1ae7fcd51c Merge "Expose "full" dexpreopt.config" am: a3693772a6 am: 375e5d7a47 am: fcf8e11732
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1666384

Change-Id: I182ab0a4ebdb80eb9ff812fb8d21607525769d80
2021-04-23 08:10:51 +00:00