Commit Graph

4181 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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