Commit Graph

4857 Commits

Author SHA1 Message Date
Paul Duffin 817187082c Merge "Move copying of dex files from dexpreopt_bootjars singleton" am: cfd24da1f4 am: 7be9378c61
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690881

Change-Id: I75aa39288ab8f7350d7844c7e4dd262c635746d6
2021-05-13 11:35:04 +00:00
Paul Duffin cfd24da1f4 Merge "Move copying of dex files from dexpreopt_bootjars singleton" 2021-05-13 10:53:51 +00:00
Paul Duffin 22628d50f3 Add support for SOONG_SDK_SNAPSHOT_USE_SRCJAR
Test: m SOONG_SDK_SNAPSHOT_USE_SRCJAR=true ipsec-module-sdk
      - check generated snapshot.zip file.
Change-Id: I02991e2a60d7784984b308cff2c47ee809d61f01
2021-05-12 23:13:22 +01:00
Ivan Lozano a072c5ae56 Merge "Refactor vendor snapshot to use LinkableInterface." am: 7ce2dee09e am: 61c475060a am: 001c11e93a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1680606

Change-Id: Ifff15886dba6bda0754d086456a1db3b7524e4ed
2021-05-12 21:13:41 +00:00
Ivan Lozano 001c11e93a Merge "Refactor vendor snapshot to use LinkableInterface." am: 7ce2dee09e am: 61c475060a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1680606

Change-Id: I2826cb9898e093f5669700c8d98e314b445ee639
2021-05-12 20:55:58 +00:00
Paul Duffin 2fc82ad044 Build boot images in bootclasspath_fragment/platform_bootclasspath
Moves the building of boot images from the dexpreopt_bootjars singleton
to the bootclasspath_fragment and platform_bootclasspath.

The art boot image is generated by the art-bootclasspath-fragment
module and the framework boot image by the platform-bootclasspath
module.

This does temporarly duplicate the generation of an identical boot
profile for each image. As part of the work to modularize the boot
image profile each image will have its own custom default boot profile.

Bug: 177892522
Bug: 186455808
Test: m droid and TreeHugger
Change-Id: I23cf05ec7648749b21c7cf6fcba282b46649a981
2021-05-12 21:51:27 +01:00
Paul Duffin 47932935e9 Separate storing config for MakeVars from building boot image
Previously, the initialization of the dexpreoptBootJars fields used to
store information needed in its MakeVars method was interleaved with
the calls to buildBootImage(). In fact those fields were initialized
from the *bootImageConfig returned by buildBootImage(). However, the
method simply returned the *bootImageConfig value that was passed in.

Separating the initialization from the calls to buildBootImage() allows
the functionality to be moved to platform_bootclasspath separately.

Bug: 177892522
Test: m nothing
Change-Id: I8ba460f60be553516de5f186e14377bb0ec1b2cd
2021-05-12 21:51:27 +01:00
Paul Duffin 7ebebfd5f8 Move copying of dex files from dexpreopt_bootjars singleton
The art dex files are copied in the bootclasspath_fragment and the
non-updatable and updatable dex files are copied in the
platform_bootclasspath.

Bug: 177892522
Test: m nothing
Change-Id: I5d3d533d1a7a9f8e7ae20c12eb33029a898a2cd6
2021-05-12 21:51:19 +01:00
Ivan Lozano d7586b6526 Refactor vendor snapshot to use LinkableInterface.
Refactors the vendor snapshot support to use the LinkableInterface
so that support can be extended to Rust. This CL does not add
vendor snapshot support for Rust; that is left for a follow-on CL.

Bug: 184042776
Test: m nothing
Change-Id: Id0c4970ca00053484a52677d182153cbc454c301
2021-05-12 14:01:10 -04:00
Jaewoong Jung 310e197d6d Merge "Strict updatability linting against dependencies." am: ccbbeb6965 am: 9319584fad am: bcaf0e855b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702008

Change-Id: Ie02a46af6665bd6158a4bc1acd72be5d129d0854
2021-05-11 16:34:54 +00:00
Jaewoong Jung bcaf0e855b Merge "Strict updatability linting against dependencies." am: ccbbeb6965 am: 9319584fad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1702008

Change-Id: I9f334ee36a091a02b8df1a7493299675c656ed5a
2021-05-11 16:10:22 +00:00
Jaewoong Jung ccbbeb6965 Merge "Strict updatability linting against dependencies." 2021-05-11 15:24:06 +00:00
Treehugger Robot ddcf758f8c Merge "Generate empty classpaths.proto for bootclasspath_fragment.go." am: a556647c50 am: 3e51be492f am: 613e4c502a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699193

Change-Id: Ia92df6204946e3e28341cd27a75d108b657754cc
2021-05-11 13:44:08 +00:00
Treehugger Robot 613e4c502a Merge "Generate empty classpaths.proto for bootclasspath_fragment.go." am: a556647c50 am: 3e51be492f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699193

Change-Id: Ia3e193863fffc4222edd3ddc908a5f489f1e7a61
2021-05-11 13:27:02 +00:00
satayev 3db3547d1f Generate empty classpaths.proto for bootclasspath_fragment.go.
- Adds all required details for bootclasspath_fragment to implement
  classpath_fragment.
- Keeps the actual boot jars in platform-bootclasspath to begin with.
- Makes sure to put the file in apex/etc/classpath on device. Note that
  for platform versions of classpath fragment AndroidMkEntries perform
  the installation, while for APEXes it must be plumbed via apex.go.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6101ebdf5b8bcbe95c0b7ce21f3f67a2685aef50
2021-05-11 10:34:47 +01:00
Jaewoong Jung 476b9d6d17 Strict updatability linting against dependencies.
Propagate strict_updatability_linting to transitive dependencies using a
top-down mutator.

Test: lint_test.go
Bug: 182349282
Change-Id: Ifc9e58f1a597e3c7725ee49b4027afb6f42f45cb
2021-05-10 15:30:00 -07:00
Treehugger Robot 8c112087cb Merge "Rename fields in dexpreopt config" am: 564fce4578 am: f8f3b93130 am: 517f7ba95b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699427

Change-Id: Iadeefe9966ca6b3ce5815befc6f6616c87a7c26b
2021-05-08 02:45:56 +00:00
Treehugger Robot 517f7ba95b Merge "Rename fields in dexpreopt config" am: 564fce4578 am: f8f3b93130
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699427

Change-Id: I6614ad3de51e09cd74ef0b75e31bfca3ac116cb5
2021-05-08 02:27:10 +00:00
Treehugger Robot 564fce4578 Merge "Rename fields in dexpreopt config" 2021-05-08 01:47:39 +00:00
satayev 4cb335b3e5 Merge "Declare ConfiguredJarList in specific fragment implementations." am: ee7e359131 am: 4c58850bbf am: 01ac28b3bb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699192

Change-Id: Id0913f243c279cd8d64982d3b8fe16c66b3b3fae
2021-05-07 20:51:15 +00:00
satayev 01ac28b3bb Merge "Declare ConfiguredJarList in specific fragment implementations." am: ee7e359131 am: 4c58850bbf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699192

Change-Id: Ief67bfa6e112726d610acc30547b3526d563bce0
2021-05-07 20:29:12 +00:00
satayev ee7e359131 Merge "Declare ConfiguredJarList in specific fragment implementations." 2021-05-07 19:41:08 +00:00
Treehugger Robot 4fe97969e7 Merge "Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath." am: 3b755d4560 am: afa1bff5aa am: 1ba4987c0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689755

Change-Id: Id30b2f1354e36af0183b814c4f93fbc620345738
2021-05-07 19:13:59 +00:00
Treehugger Robot 1ba4987c0e Merge "Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath." am: 3b755d4560 am: afa1bff5aa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689755

Change-Id: I6346fe8c962441bebd49bb007f888e3577a94cbe
2021-05-07 18:49:22 +00:00
Treehugger Robot 3b755d4560 Merge "Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath." 2021-05-07 18:34:52 +00:00
satayev 013485bd83 Declare ConfiguredJarList in specific fragment implementations.
Each specific classpath_fragment module knows what jars must be part
of the corresponding classpaths.proto config.

Note that bootclasspath_fragment does not implement classpath_fragment
yet, thus all boot jars and all system server jars go into corresponding
platform classpaths.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I6a8c7b0a5d17d62e790a441b8e2c5c1a816e7f30
2021-05-07 16:31:07 +01:00
Paul Duffin 5e1308f1a4 Merge "Install updatable-bcp-packages.txt and boot-image.bprof" am: 225e4dbae4 am: 655970204c am: 690697082b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699203

Change-Id: I9d9dd64c8ba4c2512403a647c322964f225d35d9
2021-05-07 15:24:38 +00:00
Paul Duffin 690697082b Merge "Install updatable-bcp-packages.txt and boot-image.bprof" am: 225e4dbae4 am: 655970204c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699203

Change-Id: I4954e75a300a11f86a20e7113afaeec107295faf
2021-05-07 15:04:51 +00:00
Paul Duffin fc84067bd3 Merge "Stop exporting java_sdk_library libs in the snapshot" am: 320055eb8c am: 78ff835a32 am: 2e4abd4a58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697676

Change-Id: If10f3212b75bd6aca4126c633fce3f66fd3da40f
2021-05-07 14:21:56 +00:00
Paul Duffin 225e4dbae4 Merge "Install updatable-bcp-packages.txt and boot-image.bprof" 2021-05-07 14:14:20 +00:00
Paul Duffin 2e4abd4a58 Merge "Stop exporting java_sdk_library libs in the snapshot" am: 320055eb8c am: 78ff835a32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697676

Change-Id: I309abc61fb11075093214df29eda9ef1d44cd595
2021-05-07 14:05:10 +00:00
Paul Duffin 320055eb8c Merge "Stop exporting java_sdk_library libs in the snapshot" 2021-05-07 13:34:33 +00:00
Paul Duffin c05cbcebb5 Merge "Make all SdkMemberTypes support transitive member deps" am: dbb490359a am: e1fab6a30b am: 8d108bac17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699188

Change-Id: I65568bd7614795269017f59c0e3e3f28ef9b91eb
2021-05-07 13:03:34 +00:00
Paul Duffin 668b463729 Merge "Add missing calls to InitSdkAwareModule" am: 820ed78954 am: c74ff5cae5 am: 33334e65b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699185

Change-Id: I905acd55de919d38a0248d32b5daabf8452e9d23
2021-05-07 13:03:15 +00:00
Paul Duffin 8d108bac17 Merge "Make all SdkMemberTypes support transitive member deps" am: dbb490359a am: e1fab6a30b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699188

Change-Id: Ia82883e6085db6f19ed5c5307b78e72959cd4da2
2021-05-07 12:44:10 +00:00
Paul Duffin 33334e65b7 Merge "Add missing calls to InitSdkAwareModule" am: 820ed78954 am: c74ff5cae5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1699185

Change-Id: I4bf1ee3640bab68d7c38079e71eec25f212a84c3
2021-05-07 12:43:54 +00:00
Jeongik Cha a596909342 Rename fields in dexpreopt config
Add 'host' into the name of fields regarding path on the host side to
distinguish between paths on the device(which will be added in the
following commit), and paths on the host.

Bug: 158843648
Test: build and flash, and then
  adb wait-for-device \
    && adb -s $S root \
    && adb -s $S logcat \
    | grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C 1
Change-Id: Ib2645ed51591ba2f4b726c115b401ad2bd6675da
2021-05-07 21:40:23 +09:00
Paul Duffin dbb490359a Merge "Make all SdkMemberTypes support transitive member deps" 2021-05-07 12:31:15 +00:00
satayev 95e9c5bbfa Split SYSTEMSERVERCLASSPATH entries from platform_bootclasspath.
Boot jars are different to system server jars at build level, due to
added complexity of dexpreopt. As a logical separation add a new
classpath fragment type and split existing classpaths.proto generation
into relevant pieces.

Bug: 180105615
Test: m && launch_cvd; atest CtsClasspathsTestCases
Change-Id: I88bec09fc920166ffd0092faef980754ddeb6593
2021-05-07 13:24:16 +01:00
Paul Duffin 820ed78954 Merge "Add missing calls to InitSdkAwareModule" 2021-05-07 12:15:16 +00:00
Paul Duffin be007d1800 Install updatable-bcp-packages.txt and boot-image.bprof
Previous refactorings of the code for creating these two files caused
them to be created before the boot.prof file instead of afterwards. As
a result even though they were appended to the list of files to install
they were discarded when the boot.prof file set the list rather than
appended to it. That worked before the refactoring because the
boot.prof file set the list first before the others were appended to
it.

This change appends the boot.prof file to the list making the order in
which they are added irrelevant.

Bug: 187494247
Test: m nothing
      - check DEXPREOPT_IMAGE_PROFILE_BUILT_INSTALLED in generated
        make_vars file to ensure it includes all 3 files.
Change-Id: Idb94531daf61b1b047c72eb5c67a57d3fdced05c
2021-05-07 13:07:34 +01:00
Paul Duffin f93ca54858 Merge "Transitively add APEX variants for contents of prebuilt_apex/apex_set" am: c76155cd71 am: c8e88cf3f7 am: 85e40bba2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697056

Change-Id: Ieed47b213f67248c1bc13957036c1037c356789b
2021-05-07 09:15:50 +00:00
Paul Duffin 85e40bba2c Merge "Transitively add APEX variants for contents of prebuilt_apex/apex_set" am: c76155cd71 am: c8e88cf3f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697056

Change-Id: I25aaada86866e4a869972a106d07a8e7c9208f68
2021-05-07 09:00:35 +00:00
Paul Duffin b17d044628 Transitively add APEX variants for contents of prebuilt_apex/apex_set
This is part of the work needed to allow the exported_java_libs
property to be replaced by exported_bootclasspath_fragments.

Bug: 187266082
Test: m nothing
      m SOONG_CONFIG_art_module_source_build=false nothing
Change-Id: I2c1d70a390200b93163f9799719290c9d55a041c
2021-05-06 23:43:43 +01:00
Paul Duffin e7c94a689b Stop exporting java_sdk_library libs in the snapshot
The libs property in java_sdk_library is not safe to export as it can
contain libraries that contain implementation specific classes. No
snapshot appears to need this capability but if it does become
necessary then either it will need to use the existing stub_only_libs
property or a new one will need to be added.

Bug: 157884619
Test: m nothing
Change-Id: I60a069177dbee4070d311b23d25f4eb3c5e7ea13
2021-05-06 23:22:15 +01:00
Paul Duffin 2d3da31d41 Make all SdkMemberTypes support transitive member deps
Previously, only those SdkMemberTypes which had specific need to
automatically add some of their dependencies as sdk members would cause
the sdk to visit their transitive dependencies. However, as any module
can have dependencies on license modules and license modules need to be
included in the sdk then it needs to visit transitive dependencies of
all members.

So, this change removes the support for allowing an SdkMemberType to
control whether its transitive dependencies are visited and just visits
them all.

This does not have any effect on sdk snapshots as in order for a
dependency to be added to an sdk it needs to be added with a tag that
implements SdkMemberTypeDependencyTag and the only tags that implement
this are used by SdkMemberTypes that had enabled transitive members.

Bug: 181569894
Test: m art-module-sdk art-module-host-exports art-module-test-exports
      - verify that this change has no effect on the generated snapshots
Change-Id: If0293af0237aa7e39335e5b8383a41c023ff5853
2021-05-06 23:13:06 +01:00
Paul Duffin b6b89a4074 Add missing calls to InitSdkAwareModule
A follow up change will add methods to SdkBase which requires its
module field to have been initialized.

Bug: 181569894
Test: m nothing
Change-Id: I9b02f260ad3f82316cc7ab3b5717b7e81090b0d8
2021-05-06 23:13:06 +01:00
satayev 9428cfec39 Rename classpath_fragment.go methods for better readability. am: 128ce2ff73 am: 0309f55c23 am: b2f4c1919b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697680

Change-Id: I3925effc85faa254f9f684919a6f7a0c47e9ea52
2021-05-06 15:09:32 +00:00
satayev b2f4c1919b Rename classpath_fragment.go methods for better readability. am: 128ce2ff73 am: 0309f55c23
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697680

Change-Id: Id7792fd28b5b8904cdbe1b3cefbd3546fee13277
2021-05-06 14:52:55 +00:00
satayev 128ce2ff73 Rename classpath_fragment.go methods for better readability.
Bug: 180105615
Test: m nothing
Change-Id: Ic663c22e5b7cbab487dc1fe99805e08843c3213d
2021-05-06 13:27:28 +01:00
satayev ff97fc5f87 Merge "Make SystemServerJars ConfiguredJarList." am: 63bc30fc12 am: fb5c5cd8ee am: 0caa3a31f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1695707

Change-Id: I092ce2214e749870d0298b53ea925ba77b6b4f03
2021-05-06 12:24:59 +00:00
satayev 0caa3a31f1 Merge "Make SystemServerJars ConfiguredJarList." am: 63bc30fc12 am: fb5c5cd8ee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1695707

Change-Id: Iac71d56beab3b106a20275867034e871b00a974c
2021-05-06 12:09:30 +00:00
satayev 63bc30fc12 Merge "Make SystemServerJars ConfiguredJarList." 2021-05-06 11:32:39 +00:00
Anton Hansson 65b1fcbd30 Merge "Move stub providers to droidstubs.go" am: 93e8f79577 am: 6e2cb706a9 am: 1c7a3af8e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697050

Change-Id: Ia78cd777b640ec199e83124303b4969712ab0d98
2021-05-05 14:25:35 +00:00
Anton Hansson 1c7a3af8e9 Merge "Move stub providers to droidstubs.go" am: 93e8f79577 am: 6e2cb706a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1697050

Change-Id: I4ba9fb69d07b6ce5c7d7bed21b0d2a10e20b019c
2021-05-05 14:07:10 +00:00
satayev 9a6f87ebd6 Make SystemServerJars ConfiguredJarList.
Consistent with plumbing of boot jars. SystemServerJars only support /system/framework/ jars.

Bug: 180105615, 155630745
Test: m && launch_cvd
Change-Id: I58b005b7c4103c8e250090e995b1d9b2f9ed4a76
2021-05-05 14:24:02 +01:00
Anton Hansson 93e8f79577 Merge "Move stub providers to droidstubs.go" 2021-05-05 13:17:37 +00:00
Anton Hansson 5260932812 Move stub providers to droidstubs.go
They fit better there than in droiddoc.go.

Test: m nothing
Change-Id: I44588f1df2094f14881f920246bd19ffc6e1615c
2021-05-05 10:36:05 +01:00
Paul Duffin df2363886c Support dex_import on platform_bootclasspath am: 4977540bcb am: d40a947de4 am: 07ec76efa9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690875

Change-Id: Ib5b1708ff780fb2eb485752dc97531b5df10324d
2021-05-04 18:39:55 +00:00
Paul Duffin 07ec76efa9 Support dex_import on platform_bootclasspath am: 4977540bcb am: d40a947de4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690875

Change-Id: I0b3db8fc192526b65aeecf406adceb2a37339002
2021-05-04 18:12:26 +00:00
Paul Duffin 4977540bcb Support dex_import on platform_bootclasspath
Maintain compatibility with previous behavior by ignoring dex_import
during hidden API processing.

Bug: 179354495
Test: m nothing
Change-Id: I976b02129bf981b7b61dce233567d6f89e04f92d
2021-05-04 14:07:23 +01:00
Colin Cross f66d8c85fc Merge changes If6996bd8,I91df5c3f am: b55ceca568 am: f40a872210 am: 57230dd2a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691595

Change-Id: I4b96418a2f4079b9d493fe8039f785a9cb1e0e1b
2021-05-04 00:05:16 +00:00
Colin Cross 57230dd2a0 Merge changes If6996bd8,I91df5c3f am: b55ceca568 am: f40a872210
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691595

Change-Id: I1590eed9ebbfe556383a15f142f2782076492869
2021-05-03 23:49:34 +00:00
Colin Cross 29c294b2cf Time out and dump stacks from R8 processes after 30 minutes
R8 processes are sometimes hanging on the build servers.  Wrap R8 with
run_with_timeout to dump the stacks with jstack and kill the process
after 30 minutes.  Switch from running with the r8-compat-proguard
shell script to running the jar directly so that jstack gets the pid
of the java process.

Bug: 181095653
Test: m checkbuild
Test: m NetworkStackNextIntegrationTests
Test: m USE_RBE=true RBE_R8=true RBE_R8_EXEC_STRATEGY=remote NetworkStackNextIntegrationTests
Change-Id: If6996bd8eb39c7a8453d79e825004339c009ade2
2021-04-30 14:14:46 -07:00
Paul Duffin f4a4e865cf Merge "Split findAndCopyBootJars into separate find and copy functions" am: 21695e2ce9 am: ca945032c8 am: 60bdd6c0ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688393

Change-Id: I2c42f4e70245a1d37d8690abe0b61b71fd04adf9
2021-04-30 17:02:45 +00:00
Paul Duffin 60bdd6c0ff Merge "Split findAndCopyBootJars into separate find and copy functions" am: 21695e2ce9 am: ca945032c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688393

Change-Id: I06de6a17abd3d80c4a45834cfa73d43801c5ee9c
2021-04-30 16:44:18 +00:00
Paul Duffin 21695e2ce9 Merge "Split findAndCopyBootJars into separate find and copy functions" 2021-04-30 16:09:56 +00:00
Paul Duffin 83545d0d06 Merge "Fix build failure when building unbundled apps (second try)" am: fdf4050440 am: 3e7cb6c6e2 am: fba7e1865b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690873

Change-Id: Ib96a5fb9091d1a8023591dae214a36c52c25668b
2021-04-30 15:14:00 +00:00
Paul Duffin fba7e1865b Merge "Fix build failure when building unbundled apps (second try)" am: fdf4050440 am: 3e7cb6c6e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690873

Change-Id: I22f53ffb39fe742312b0c46f88df873a399e0159
2021-04-30 14:57:29 +00:00
Paul Duffin fdf4050440 Merge "Fix build failure when building unbundled apps (second try)" 2021-04-30 14:16:32 +00:00
Treehugger Robot cb249eb7d0 Merge "Move configuration checks from getBootImageJar" am: 3f9af76391 am: e4a004eaa3 am: a1fe410f89
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688391

Change-Id: I3dc9ceef57776a0198911365d2235b471f412513
2021-04-30 13:57:30 +00:00
Treehugger Robot a1fe410f89 Merge "Move configuration checks from getBootImageJar" am: 3f9af76391 am: e4a004eaa3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1688391

Change-Id: Ibca12ee5931a2de6738a42b320ae0f4ce2628f64
2021-04-30 13:37:58 +00:00
Andrei-Valentin Onea 4a1d304885 Merge "Exclude RequiresApi from generated stubs" am: f794e8269d am: ea34723186 am: c4e90a7a3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690867

Change-Id: I605efcb029fa9566d381db763c81d0d0b9755197
2021-04-30 13:31:53 +00:00
Andrei-Valentin Onea c4e90a7a3f Merge "Exclude RequiresApi from generated stubs" am: f794e8269d am: ea34723186
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690867

Change-Id: I62b2271e6cdddedfb1b1e7ce417cd3f2fd0ab910
2021-04-30 13:05:55 +00:00
Treehugger Robot 3f9af76391 Merge "Move configuration checks from getBootImageJar" 2021-04-30 12:56:56 +00:00
Paul Duffin d504c3ac83 Fix build failure when building unbundled apps (second try)
The previous attempt, which simply skipped the hidden API processing
altogether when unbundled builds were enabled failed when attempting to
build module snapshots as while they enabled an unbundled build they
actually need the hidden API processing to be performed.

This change just checks whether missing dependencies are allowed and if
so it fakes up any missing files so that the build will only fail if
they are not present AND they are used.

Bug: 186695448
Bug: 185828824
Test: tapas Calendar
      m -j60

Change-Id: Ie13fed05af0aba51f45f6791fce944d0e4285037
2021-04-30 13:42:44 +01:00
Andrei-Valentin Onea f794e8269d Merge "Exclude RequiresApi from generated stubs" 2021-04-30 12:31:07 +00:00
Paul Duffin d6894ca4b9 Split findAndCopyBootJars into separate find and copy functions
The main difference between the dexpreopt_bootjars singleton and the
platform_bootclasspath singleton module is the way they find the
modules to use. The former searches all modules, the latter adds
dependencies on the modules that they need. This change separates the
finding of the modules from the copying of the boot jars for those
modules to make it easier to move the remaining functionality to
platform_bootclasspath.

This temporarily creates a singleton specific copy of the hidden API
function isModuleInConfiguredList() to select the modules in place of
the logic in the getBootJar() method. There is a slight loss of context
information from the error messages but as these methods will be
removed once the boot image creation has moved this is not an issue.

While switching the isModuleInConfiguredListForSingleton() to use the
SingletonContext the error message was fixed to include the name of
the module with the issue.

Bug: 177892522
Test: m nothing
Change-Id: Iaea906da95d9da5301fb964fc593890f2216d336
2021-04-30 12:10:54 +01:00
Paul Duffin f23bc472b0 Move configuration checks from getBootImageJar
The getBootImageJar function will be removed once the boot image
creation has been moved to the platform_bootclasspath and
bootclasspath_fragment module types. However, the consistency checks
that it performs are still useful so this change moves them out
first.

The ART boot image related checks are now performed in the
bootclasspath_fragment module type. A previous change accidentally
disabled the checks when the contents property was not empty which has
been fixed. Also, the error messages have been tweaked to make it clear
that the art-bootclasspath-fragment is now the source of truth as to
its contents not the configuration.

The framework boot image related checks are now performed in the
platform_bootclasspath module type.

Initially, this change included an extra check to make sure that
UpdatableBootJars comes from updatable APEXes but that broke because
framework-wifi and framework-tethering are not currently marked as
updatable in AOSP.

Bug: 177892522
Test: m nothing
Change-Id: I80fb600fa2c7cec4566b3461c6a33c4c6f0743f4
2021-04-30 12:06:28 +01:00
Treehugger Robot e6bddfb852 Merge "Revert "Fix build failure when building unbundled apps"" am: 1468cc4a10 am: 00803e6ee9 am: 60fd78300a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691213

Change-Id: I73a5d01fb0ef8032375109f58985a6ab1433b1e6
2021-04-30 03:58:06 +00:00
Treehugger Robot 60fd78300a Merge "Revert "Fix build failure when building unbundled apps"" am: 1468cc4a10 am: 00803e6ee9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691213

Change-Id: If8752e8d442d5141af41b9e607e78634a0121cf7
2021-04-30 03:22:59 +00:00
Treehugger Robot 1468cc4a10 Merge "Revert "Fix build failure when building unbundled apps"" 2021-04-30 01:52:57 +00:00
Vishnu Nair 0dbd02a3ac Revert "Fix build failure when building unbundled apps"
This reverts commit c027119e73.

Reason for revert: b/186797512
Test: vendor/google/build/build_mainline_modules.sh -j80

Change-Id: I2bb062cce09ac6717702c4f6b110acbb2887adec
2021-04-30 00:24:07 +00:00
Paul Duffin 7e425005f3 Merge "Fix build failure when building unbundled apps" am: 5983d856c1 am: 7e953b936d am: 223ffec55e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690870

Change-Id: I54acecf34b0bed3e55879ae299f05d96cad42c60
2021-04-29 21:45:27 +00:00
Paul Duffin 4ed0fb2d22 Merge "Move generation of hidden API make vars to platform_bootclasspath" am: ad7fa97f8d am: 8eee268aa7 am: 29742054b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690548

Change-Id: Ie87b10a2d8b8476639716fbdeef3fa97c059242d
2021-04-29 21:44:57 +00:00
Paul Duffin 223ffec55e Merge "Fix build failure when building unbundled apps" am: 5983d856c1 am: 7e953b936d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690870

Change-Id: I24060082f5c72f6973c05d757b40089e4412b24f
2021-04-29 21:20:15 +00:00
Paul Duffin 29742054b5 Merge "Move generation of hidden API make vars to platform_bootclasspath" am: ad7fa97f8d am: 8eee268aa7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690548

Change-Id: I28a48fc2e7a40b5445a23154430b0673072b302d
2021-04-29 21:19:17 +00:00
Paul Duffin 5983d856c1 Merge "Fix build failure when building unbundled apps" 2021-04-29 20:19:54 +00:00
Paul Duffin c027119e73 Fix build failure when building unbundled apps
Bug: 186695448
Bug: 185828824
Test: tapas Calendar
      m -j60
Change-Id: I1c5365f6d2afb2f2d159e6f6ed004647ec6d2427
2021-04-29 19:50:40 +01:00
Paul Duffin f893961bd5 Merge "Make platform_bootclasspath a singleton module" am: 86477cfeb2 am: 4b00abc5f7 am: 8c7c87d7d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690547

Change-Id: Ife696408f4261fd4bc39ac31ac7c34d70cc9a4cc
2021-04-29 18:45:16 +00:00
Paul Duffin 8c7c87d7d7 Merge "Make platform_bootclasspath a singleton module" am: 86477cfeb2 am: 4b00abc5f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690547

Change-Id: I563e1ba0994e692f48e4c247ccc0541ac408908d
2021-04-29 18:28:09 +00:00
Andrei Onea 4985e518f8 Exclude RequiresApi from generated stubs
This annotation is required for linting, but is not useful in stubs.

Bug: 185579441
Test: cherry-pick http://ag/14098354 and regenerate stubs
Change-Id: I7e4da99a8843b9c709f3b59f125f43cbd66bda4e
2021-04-29 17:00:46 +00:00
Paul Duffin 12d29b7786 Move generation of hidden API make vars to platform_bootclasspath
Bug: 179354495
Test: rm out/soong/make_vars*
      m nothing
      grep INTERNAL_PLATFORM_HIDDENAPI_FLAGS out/soong/make_vars*
      - make sure it is still out/soong/hiddenapi/hiddenapi-flags.csv
Change-Id: I86e56512a9a2091f446bad25294d41ea1f4341ee
2021-04-29 15:11:35 +01:00
Paul Duffin e8e530cd2c Merge "Move dumpOatRules to platform_bootclasspath" am: 3f9c16af2d am: 58da3e8a80 am: f062acb20b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686128

Change-Id: I5147ab79dc076264f787a42fa5968683a81760b4
2021-04-29 13:32:34 +00:00
Paul Duffin c2a9baa7d8 Merge "Move generateUpdatableBcpPackagesRule to platform_bootclasspath" am: e084f1d717 am: b72a9487b8 am: ae23514b50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686154

Change-Id: I8386537936c21f1b0cee4372022220395854428e
2021-04-29 13:32:30 +00:00
Paul Duffin 640d548cf7 Merge "Differentiate between art, non-updatable and updatable modules" am: c1fc9faee6 am: c1c4b84478 am: cba4d88707
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686153

Change-Id: I9912def06a1f8a1b64c93be35b8a3c12e3b3a38b
2021-04-29 13:32:26 +00:00
Paul Duffin 2207583cc9 Merge changes I16389102,I105f4fba am: 12206326d6 am: bbc5cbcf0f am: 8255b2c5d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689752

Change-Id: Ic76b304687f2c205c5962c39a44aef0a9afc3a8b
2021-04-29 13:32:19 +00:00
Paul Duffin f062acb20b Merge "Move dumpOatRules to platform_bootclasspath" am: 3f9c16af2d am: 58da3e8a80
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686128

Change-Id: I8d86338ade67b51e019b558ab1a38e855654c58e
2021-04-29 12:53:04 +00:00
Paul Duffin ae23514b50 Merge "Move generateUpdatableBcpPackagesRule to platform_bootclasspath" am: e084f1d717 am: b72a9487b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686154

Change-Id: I23c5d58bc071017b40a4c6988e9550e5ab102ef6
2021-04-29 12:53:01 +00:00
Paul Duffin cba4d88707 Merge "Differentiate between art, non-updatable and updatable modules" am: c1fc9faee6 am: c1c4b84478
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686153

Change-Id: I63837609ea1a88ef2223d9317e5b79fe7658b0e8
2021-04-29 12:52:57 +00:00
Paul Duffin 8255b2c5d1 Merge changes I16389102,I105f4fba am: 12206326d6 am: bbc5cbcf0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689752

Change-Id: I0fcae956aba20eb4c2db993396e74bb7949b3700
2021-04-29 12:52:54 +00:00
Paul Duffin e3ecce67c1 Make platform_bootclasspath a singleton module
This is needed in order to allow it to implement MakeVars so it can
create make variables just like the dexpreopt_bootjars and hiddenapi
singletons currently do.

Bug: 177892522
Bug: 179354495
Test: m nothing
Change-Id: Ida5bf8abeecde531e1f6430151650065445804ac
2021-04-29 13:37:16 +01:00
Paul Duffin 0c22202947 Merge "Add stub_libs properties to bootclasspath_fragment snapshot" am: 50599f7735 am: ce7396186d am: 454efed2ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686206

Change-Id: If2a3d61b51248c32c70fffc13afc39eb73f9d053
2021-04-29 10:52:40 +00:00
Paul Duffin f7a5592d38 Move dumpOatRules to platform_bootclasspath
Bug: 177892522
Test: m oat-dump-boot
      - test output to make sure that this change does not change the
        generated files, at least no more than no changes do as the
	output from this rule is not deterministic. See b/186459873.

Change-Id: Ib2b4203d9bb1fd0ee9443aee4e58b54b38b491cf
2021-04-29 11:50:48 +01:00
Paul Duffin 4c094428a7 Move generateUpdatableBcpPackagesRule to platform_bootclasspath
Changes generateUpdatableBcpPackagesRule to use ModuleContext instead
of SingletonContext and moves the call from dexpreoptBootJar's
GenerateSingletonBuildActions method to platform_bootclasspath's
GenerateAndroidBuildActions.

Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I9741ae1eb9573cafe12dd7a17dc1d8449b224dc8
2021-04-29 11:50:48 +01:00
Paul Duffin 01b463bc06 Differentiate between art, non-updatable and updatable modules
Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I3d35f1664cbbaba5df3f5809859dd9815a26d05d
2021-04-29 11:50:42 +01:00
Paul Duffin 9bacf56564 Extract logic to gather deps added for <apex>:<module> pairs
Trades having to traverse a module's direct dependencies multiple times
for reusable code. While at the minute the amount of duplicated code is
small (checking a tag and appending to a list) follow up changes will
modify the gatherApexModulePairDepsWithTag module to improve error
reporting greatly increasing the benefit of deduping.

The cost of traversing a module's direct dependencies is very small as
there will be only a very few dependencies.

Bug: 177892522
Test: m nothing
Change-Id: I16389102abd8038e1bfa52b63f4153bdf92ff553
2021-04-29 11:34:59 +01:00
Paul Duffin 454efed2ed Merge "Add stub_libs properties to bootclasspath_fragment snapshot" am: 50599f7735 am: ce7396186d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686206

Change-Id: I03ad268a1e143379747212c9724ad90c3ab5865c
2021-04-29 10:17:37 +00:00
Paul Duffin a7c96bb1e5 Merge "Add support for specifying api provided by bootclasspath_fragment" am: 0948060f50 am: 126a48b0c5 am: e30368dc81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686205

Change-Id: I4216d71d26a2e6256220359c60de0927119f5731
2021-04-29 10:02:29 +00:00
Paul Duffin e30368dc81 Merge "Add support for specifying api provided by bootclasspath_fragment" am: 0948060f50 am: 126a48b0c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686205

Change-Id: If9064df010fb534a0622024a9be8677f5ccc8b04
2021-04-29 09:46:14 +00:00
Paul Duffin 110b0add9e Treat "apex" system_ext the same as platform
Change https://r.android.com/1672245 added support to treat
system_ext:foo in the boot jars configuration the same as platform:foo,
at least for dexpreopt_bootjars.go's getBootJar.

This change replicates that mechanism in platform_bootclasspath and as
that now handles hidden API processing also made a similar change in
the isModuleInConfiguredList function.

Bug: 177892522
Bug: 154976937
Test: m nothing
Change-Id: I105f4fbaa3b0355b013b7c5618d218d888faefb6
2021-04-29 10:35:10 +01:00
Paul Duffin 895c7140a9 Add stub_libs properties to bootclasspath_fragment snapshot
Bug: 177892522
Test: m nothing
Change-Id: I7644122c4abed8e8bc2cc7b58f408bee3bdc91f6
2021-04-28 22:02:00 +01:00
Paul Duffin 1093158faf Add support for specifying api provided by bootclasspath_fragment
The hidden API processing needs access to dex stub jars for the API
scopes provided by the bootclasspath_fragment so that it can mark the
corresponding dex members as being part of that API. This change adds
the ability to specify the modules that provide those jars, resolve the
modules to dex jar stubs and make them available for other modules and
tests to use.

While the stubs are only needed for hidden API at the moment these were
not added to the hidden_api properties section as there are other parts
of the build that may need to access the stubs in future, e.g. api
fingerprint and aidl generation.

The stubs properties can be affected by coverage as when coverage is
enabled the jacoco-stubs needs adding to the list, just like how
jacocoagent is added to the contents.

Bug: 177892522
Test: m nothing
Change-Id: I31097d1ca45c84adeba4cbb38f693698cb289e99
2021-04-28 21:59:46 +01:00
Andrei-Valentin Onea bf9b4f53de Merge "Replace source based system server stubs" am: b75031e918 am: b45d115816 am: 4f4d9c9d3c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642101

Change-Id: I9c3a0e3abd30743925d2019492967c6ad763fa0c
2021-04-28 20:22:58 +00:00
Andrei-Valentin Onea 4f4d9c9d3c Merge "Replace source based system server stubs" am: b75031e918 am: b45d115816
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1642101

Change-Id: Ic86a8c810b84173c2fe7f06d57a942d2b9082caa
2021-04-28 19:49:38 +00:00
Andrei-Valentin Onea b75031e918 Merge "Replace source based system server stubs" 2021-04-28 15:06:22 +00:00
Paul Duffin 388c7abb3f Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6 am: 9e21db0381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I5db0695a6e4ff05a39d6d158aa58b3cdab539d3e
2021-04-28 14:20:34 +00:00
Paul Duffin 9e21db0381 Merge "Extract IsModuleInVersionedSdk" am: 8d817b70e6 am: 6c101d7be6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689387

Change-Id: I02f65fc878c95b33b91fb64b2dd19a9b75f3cdb0
2021-04-28 13:52:42 +00:00
Paul Duffin 8d817b70e6 Merge "Extract IsModuleInVersionedSdk" 2021-04-28 12:58:43 +00:00
Paul Duffin 08d1fab0ee Merge "Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule" am: 0e98e86a3c am: ada6da8aa4 am: 28a48992cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686152

Change-Id: If7d4792dd003f4025f5b6f93688d5e42afb64bff
2021-04-28 12:46:24 +00:00
Paul Duffin 318e2c53b2 Merge "Remove special handling of frameworks/base/config/boot-profile.txt" am: c2477e8224 am: 497d026b5b am: 0771c16227
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686151

Change-Id: Id6f5067110e0710f2444f2d725fabad0f08b257f
2021-04-28 12:46:18 +00:00
Paul Duffin 953ee81825 Merge "Move bootFrameworkProfileRule to platform_bootclasspath" am: 9abfff5229 am: eec196310d am: c663ddce59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686150

Change-Id: Iba0466a5583e5e10b9a42f8708a09431bd7645d3
2021-04-28 12:46:06 +00:00
Paul Duffin 28a48992cd Merge "Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule" am: 0e98e86a3c am: ada6da8aa4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686152

Change-Id: I4a75e0b1b2f8977aa3dd16ec0a135c5a06fa7c0c
2021-04-28 12:28:31 +00:00
Paul Duffin 0771c16227 Merge "Remove special handling of frameworks/base/config/boot-profile.txt" am: c2477e8224 am: 497d026b5b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686151

Change-Id: I8ca954a00664950b4a6d494ee10d45d594b29088
2021-04-28 12:28:26 +00:00
Paul Duffin c663ddce59 Merge "Move bootFrameworkProfileRule to platform_bootclasspath" am: 9abfff5229 am: eec196310d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686150

Change-Id: I9f240c97a1fbee88e51b127822791b0b7bf10f9e
2021-04-28 12:28:08 +00:00
Paul Duffin 466563d5c9 Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7 am: 510e829ea5 am: 92659f37b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068

Change-Id: Ie02075fd7521b5f1d4c10440157c0b79fa7d11f1
2021-04-28 08:07:45 +00:00
Paul Duffin 8cc2b616c1 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef am: ef45d2ce43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: If9d5acbb4aadab4d1b63693a919f1fdce754413b
2021-04-28 08:07:37 +00:00
Paul Duffin 44d1594081 Extract generateUpdatableBcpPackagesRule from updatableBcpPackagesRule
This simplifies the process of moving the updatableBcpPackagesRule to
the platform_bootclasspath by separating the gathering of the list of
updatable modules (which differs between the singleton and the
platform_bootclasspath module) from the gathering of the permitted
packages list and generation of the rule which are generally common.

Bug: 177892522
Test: lunch art_module_arm64
      m out/soong/module_arm64/dex_bootjars/updatable-bcp-packages.txt
      - make sure it is not affected by this change
Change-Id: I3cb64310f618059758a32cfe00d3745d52388e49
2021-04-28 09:03:46 +01:00
Paul Duffin 2ac45f019b Remove special handling of frameworks/base/config/boot-profile.txt
Previously, the method was run in repo manifests that did not include
the frameworks/base repository so it had to handle the file being
missing. However, now that this is being called from
platform_bootclasspath which is only defined in frameworks/base that
is no longer required.

Bug: 177892522
Test: m droid
Change-Id: I77fa5a204d1426a6be24a6f0b48e18f48f3dd908
2021-04-28 09:03:46 +01:00
Paul Duffin ad19d3858e Move bootFrameworkProfileRule to platform_bootclasspath
Changes bootFrameworkProfileRule to use ModuleContext instead of
SingletonContext and moves the call from dexpreoptBootJar's
GenerateSingletonBuildActions method to platform_bootclasspath's
GenerateAndroidBuildActions.

Changing the context also allows the code to switch from
bootFrameworkProfileRule to GetGlobalSoongConfig.

Also extracts the shouldBuildBootImages function so it can be used by
platform_bootclasspath to preserve the existing behavior.

Bug: 177892522
Test: m droid
Change-Id: I30d3ca10be7f84348ad3aa9cc984dd15b8f6f4e9
2021-04-28 09:03:46 +01:00
Paul Duffin 92659f37b3 Merge "Automatically export bootclasspath_fragment stubs from sdk" am: 59dc69c2c7 am: 510e829ea5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689068

Change-Id: Id0d7393cc95b38579e11769d4c9fc61036603827
2021-04-28 07:34:58 +00:00
Paul Duffin ef45d2ce43 Merge "Pass module to SdkMemberTypeDependencyTag.SdkMemberType" am: 6a77e77cf9 am: a4e28eb6ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1689067

Change-Id: Ie49d51cba706e0d5c568b5e3ef3fa8f5febc2061
2021-04-28 07:34:48 +00:00
Paul Duffin 0c2e08312c Extract IsModuleInVersionedSdk
Bug: 177892522
Test: m nothing
Change-Id: I348d380a0d29abdd6a84420be52cc1b674f2a7ab
2021-04-28 00:39:52 +01:00
Paul Duffin 976b0e5bbb Automatically export bootclasspath_fragment stubs from sdk
This change makes the tag that is used to add dependencies onto stubs
from the bootclaspath_fragment module cause the dependency to be
automatically exported from the sdk. If the dependency is a
java_sdk_library then it will be as if it was added to the
java_sdk_libs property, otherwise it will be as if it was added to the
java_header_libs property instead.

Bug: 177892522
Test: m nothing
Change-Id: I97010c4342dd39415dba81a4395db7831410436e
2021-04-27 23:27:34 +01:00
Paul Duffin eee466e439 Pass module to SdkMemberTypeDependencyTag.SdkMemberType
This change allows an SdkMemberTypeDependencyTag to select the
SdkMemberType to use to add a dependency based on the module.

Bug: 177892522
Test: m nothing
Change-Id: I2d6e51b615636dc7cd41da65808ef851dd8ae6ac
2021-04-27 23:23:20 +01:00
Paul Duffin 7fbc5842cd Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833 am: 29b18b8c17 am: 8db612ebab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: Ic8a3591508399db477da9a72f21ee9619373cebc
2021-04-27 17:43:17 +00:00
Paul Duffin 6aa72dca5e Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4 am: c7cf6ac1e7 am: 3d87058cf8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: I9a4ec33c1b70563b23791588f132444cc384d7f7
2021-04-27 17:43:11 +00:00
Paul Duffin 67cb5fb7f3 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878 am: b49dae2874 am: 539a24e1d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: I8e184836ffec1c13cbefc802db9761999a0f0dfd
2021-04-27 17:43:02 +00:00
Paul Duffin 8db612ebab Merge "Extract default image specific logic from buildBootImage" am: 6d4de43833 am: 29b18b8c17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686149

Change-Id: Ifd9767dc1b40ac4a5346c7528329fb314aadfddc
2021-04-27 17:42:25 +00:00
Paul Duffin 3d87058cf8 Merge "Simplify missing deps handling in buildBootImage" am: c42a738bc4 am: c7cf6ac1e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686148

Change-Id: I9d5ef5fce5a283d55e7128fd41869e6dd8db5ff0
2021-04-27 17:42:16 +00:00
Paul Duffin 539a24e1d0 Merge "Remove panics from reportMissingVariationDependency" am: a75af16878 am: b49dae2874
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686147

Change-Id: Ie70916fa9d33bf32e9e6bd41506e07d7a721e391
2021-04-27 17:41:55 +00:00
Paul Duffin 5861242a78 Extract default image specific logic from buildBootImage
Previously, buildBootImage had to be called for the default boot image
config before the art boot image config as it created some rules which
were specific to default boot image. The creation of these rules was
encapsulated in Config().Once(..) to ensure that they were only ever
created once.

This change extracts that functionality out of buildBootImage to the
calling method which means that they are only called once and so no
longer need protecting against being called again.

Bug: 177892522
Test: m droid
Change-Id: I464477de1a08df15e577873a9accf7db2bc088d1
2021-04-27 15:56:47 +01:00
Paul Duffin 57e2e7d199 Simplify missing deps handling in buildBootImage
Previously, the buildBootImage function maintained a list of
missingDeps that was returned from findAndCopyBootJars and was passed
to various other methods that created ninja rules that depended on the
files created by findAndCopyBootJars. The purpose of that list was
basically to record that findAndCopyBootJars could not find some files
so that the subsequent ninja rules could be marked as being in error.

This changes avoids having to explicitly propagate the missing deps to
each rule by instead having findAndCopyBootJars generate an error rule
instead of a Cp rule for any missing file. That means that any attempt
to build any rule that depends on the missing file will fail when the
missing file is created.

Bug: 177892522
Test: Add an unknown module to PRODUCT_BOOT_JARS
      lunch art_module_arm64
      - Run each of the following targets and made sure it failed with a
        message indicating that the unknown module was missing.
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/module_arm64/dex_bootjars/boot.prof
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/boot.bprof
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true out/soong/generic_arm64/dex_bootjars/updatable-bcp-packages.txt
Change-Id: Ib7196c128419fbffdfeb61c1c5d47a3b08d1e132
2021-04-27 15:56:47 +01:00
Paul Duffin 81667c8c11 Remove panics from reportMissingVariationDependency
The code that has been removed triggers in many cases when it should
not, e.g. an unknown module on the bootclasspath. The code was
originally added to try and ensure that if the attempt to add useful
error messages failed it would help debug the issue. However, it ended
up just creating more failures.

If this does become an issue then this will be revisited.

Bug: 177892522
Test: Add an unknown module to PRODUCT_BOOT_JARS
      m SOONG_ALLOW_MISSING_DEPENDENCIES=true
Change-Id: I08dbd4b29d301f3f1f78a0fb396687062b47deb8
2021-04-27 15:56:47 +01:00
Treehugger Robot f7e6ab6eab Merge "Drop DexPreoptImages field in dexpreopt config" am: bdae1e5765 am: 73ec83be2c am: 51801ac108
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686011

Change-Id: I36a7c371baadf9c19bb7c03efcaebefee6b4b336
2021-04-27 03:23:10 +00:00
Treehugger Robot 51801ac108 Merge "Drop DexPreoptImages field in dexpreopt config" am: bdae1e5765 am: 73ec83be2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686011

Change-Id: I32468596016b597a7717eaf1e6a618b12f1a5a97
2021-04-27 02:57:14 +00:00
Treehugger Robot bdae1e5765 Merge "Drop DexPreoptImages field in dexpreopt config" 2021-04-27 01:53:45 +00:00
Paul Duffin 04c7a35a60 Merge "bootclasspath_fragment: Always output contents property in snapshot" am: aef7fcfa7e am: 817d462f97 am: b9e926f26a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686127

Change-Id: Ie02e884b4271c39c4a101e326c85eb2207434c76
2021-04-26 23:38:51 +00:00
Paul Duffin 940a777464 Merge "Automatically add bootclasspath_fragment contents to sdk" am: 56d3ea4998 am: 7d43ff1fd8 am: b157de0c84
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686126

Change-Id: I809cb2e96f550dc718886e8a78e20e7795883bd2
2021-04-26 23:37:45 +00:00
Paul Duffin d9668be58b Merge "Allow contents and image_name to be specified together" am: 3d14889c5b am: 1081c7d85e am: 143eb249d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1686066

Change-Id: I0a6cce08f1c1b48aa2e9a1832212bf7aa2d8fdec
2021-04-26 23:36:31 +00:00