Commit graph

13 commits

Author SHA1 Message Date
Paul Duffin
9b381ef2b8 platform_bootclasspath: aggregate hidden API flag files from fragments
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
2021-04-16 00:29:53 +01:00
Paul Duffin
4d101b60f0 Add the transitive dependencies of boot_image to apex
This avoids having to specify boot libraries in both the boot_image
and separately as java_libs on the apex. Simply add them to the
boot_image (happens automatically ATM when using image_name: "art")
and add the boot_image to the apex.

Bug: 177892522
Test: m nothing
Change-Id: I7e0c41665604b73780cdf0dc555067497b1e6ef0
2021-03-29 17:15:29 +01:00
Paul Duffin
82886d6cbf Add contents property to boot_image (and prebuilt_boot_image)
Allows boot_image modules to be created for any module that contributes
to the boot class path, e.g. core-i18n from the com.android.i18n.

A boot_image module with a contents property cannot specify an
image_name, and vice versa. Only those boot_image modules with an
image_name create .art, .oat and .vdex files, either in their
associated APEX or as part of the framework "boot" image.

Bug: 177892522
Test: m nothing
Change-Id: Idfc2bcf00dd6d3ed36ac4df46fcf18e8aa7e2c92
2021-03-29 17:15:27 +01:00
Paul Duffin
c7ef9892dd Add dependencies for art boot_image
Adds dependencies for the art boot image. The art boot image only
includes modules from the com.android.art APEX and so this change adds
some verification to make sure that the APEX component of the
configuration is compatible with the boot_image's apex_availabilty
settings and then just adds dependencies on the modules. It relies on
the normal APEX processing to cause the com.android.art variant of the
boot_image to depend on the equivalent variant of its contents.

This purposely does not check that the configuration specifies an APEX
of com.android.art and instead relies on the apex_available property
being set.

Bug: 177892522
Test: m nothing
Change-Id: I75a8238546b01e1f166a1d1444215f4afb441780
2021-03-29 17:13:29 +01:00
Paul Duffin
4b64ba05b6 Add bootclasspath_fragment as an alias for boot_image
This is part of the work to rename boot_image to bootclasspath_fragment
which is being done for two reasons:
1. To avoid clashing with the bootimg module type.
2. To better reflect what this represents.

While a bootclasspath_fragment can create what ART calls a boot image
(which is different to what the bootimg module type represents) it does
not have to do so.

Bug: 177892522
Test: m nothing
Change-Id: Ib45604be7adc790ded9e27a2ac812dd7522ca8db
2021-03-29 11:05:55 +01:00
Paul Duffin
64be7bb32f Change type of Image_name from string to *string
Bug: 177892522
Test: m nothing
Change-Id: Id72b6079f11c28df6248e71998fb97851cfc5be9
2021-03-29 11:05:55 +01:00
Paul Duffin
b506c9dc11 Cleanup usages of Dex2oatDepTag
Creates a new deptag type for it so that it can implement the marker
interfaces that will exclude it from being added to the APEX and from
visibility enforcement. The latter is probably not an issue ATM because
the dependencies are added after visibility checks are enforced but
this code is undergoing lots of refactoring so that may change.

Bug: 177892522
Test: m nothing
Change-Id: Ibd167d557adec761a2e3eed78f4d334c40a04fb9
2021-03-24 14:34:40 +00:00
Martin Stjernholm
b79c7f1101 Run InitAndroidArchModule last in factory functions.
It calls InitAndroidModule which retrieves the properties, so all
AddProperties must go before it.

Test: `m nothing` with new ART prebuilt drop that has a
  prebuilt_boot_image module.
Bug: 177892522
Change-Id: Ia09db9ef17148d36d8d4f25df3f1bf4f528a2fc8
2021-03-17 00:31:15 +00:00
Paul Duffin
f7f65dafb4 Add prebuilt_boot_image and add boot_images to sdk
Bug: 177892522
Test: m nothing
Change-Id: I640359acd6840507f32d7034c97d4d1c7ff591e9
2021-03-11 07:24:26 +00:00
Bob Badour
07065cd360 Allow cross-cutting dependencies like licenses.
Test: m all

Bug: 171227245
Bug: 151953481
Bug: 151177513
Bug: 67772237
Change-Id: I6e8ce01898e174a9587469157485debbb7b96980
2021-02-05 19:59:11 -08:00
Paul Duffin
5bbfef8718 Fix some minor issues with boot_image
Mistakenly used HostAndDeviceDefault (which builds host and device
variants by default) instead of HostAndDeviceSupported which only
builds a device variant by default.

Moved the test definitions of art and framework boot images from being
defined in all Java related tests into the test where they belong. This
is needed in order to improve the ART and framework boot image specific
testing.

Bug: 177892522
Test: m droid
Change-Id: I16771f09bd789033e18c58ae6dd4b6b9e865d831
2021-01-30 12:57:26 +00:00
Paul Duffin
a1d6025a49 Add boot_images to apex
Previously, the apex module had to hard code behavior specific to the
art apex module in order to include the art boot image. This change
adds support to the apex module to allow the boot images to be
specified per apex.

In combination with a change to add the "art-boot-image" to the ART
apex this allows the custom code for handling the art boot image in
apex to be removed.

That custom apex code also included the logic to ensure that the
GlobalSoongConfig was initialized for use by the dex_bootjars
singleton. That logic has been moved from the APEX to the boot_image
module. That ensures that it will be run if and only if a boot_image
module is present in the checked out repos. So, limited manifest
checkouts which do not contain the art or frameworks/base repos (which
is where the boot_image modules are defined) will not attempt to run
this logic, which would fail because dex2oat would not be present.

Bug: 177892522
Test: m droid
Change-Id: I02d25fbef6e864e31eb5e0f4eb50358c79486db0
2021-01-30 12:45:07 +00:00
Paul Duffin
3451e1600f Add boot_image module type
Adds a boot_image module type. Follow on changes will add instances of
boot_image to represent the ART and framework boot images in the art
and frameworks/base repositories respectively.

For the moment they retrieve their associated boot image configuration
from the map returned by genBootImageConfigs() and leave the actual
work of creating the ninja rules to create the boot images to the
dex_bootjars singleton.

Bug: 177892522
Test: m droid
Change-Id: Ib69701de0d24d996bb8e8be7a20b941be907390e
2021-01-26 13:00:07 +00:00