Commit Graph

5428 Commits

Author SHA1 Message Date
Paul Duffin
67b9d61ac2 Separate creation of signature patterns from overlap checking
Previously, the signatures used to select the subset of the monolithic
flags were simply the signatures read from the modular flags file. This
change moves the creation of the signature list into a separate script
that outputs the signatures to a file and then passes the path through
Soong from the bootclasspath_fragment modules that create it to the
platform_bootclasspath module that uses it to compare the modular
flags against the monolithic flags.

Currently, the signatures are the full signatures but follow up changes
will replace them with patterns (hence the name) that avoids having to
include implementation details in the hidden API flags that are output
as part of a bootclasspath_fragment's snapshot.

This change moves the stub flags related code next to the all flags
related code as they are treated in a similar way.

Bug: 194063708
Test: atest --host verify_overlaps_test signature_patterns_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - manually change files to cause difference in flags to check
        that it detects the differences.
Change-Id: I2855bf6d05c91b8a09591664185750361c7e644f
2021-08-06 13:40:34 +01:00
Colin Cross
a79a52c7c4 Reland: Pass jars with resources to R8
R8 will parse proguard files out of resources in injars.  Use the jar
with resources instead of the classes jar so that R8 can see the
proguard files.

R8 fails when an input jar contains dex files, so filter out dex files
from the input jar before passing it to r8.

This relands Ibb870ee9c70470336f542a3b7542dab86716dbf8 with a fix to
move the temporary input jar outside the output directory.  Putting it
in the output directory interacted poorly with RBE in local comparison
mode, which incorrectly deleted the output directory.

Bug: 195558228
Test: m checkbuild
Change-Id: Id4b091c3bd72d4c2904883e8793ec4b9499e4b78
2021-08-05 23:16:38 -07:00
Colin Cross
a832a04db2 Revert "Time out and dump stacks from R8 processes after 30 minutes"
This reverts commit 29c294b2cf.

The deadlock in R8 was fixed, and the timeout causes problems when
RBE is enabled and the R8 action gets stuck in a queue for 30
minutes.

Test: checkbuild
Change-Id: Ia0c3826aea3288e9db3bdbd4955e1e16c0a38fe3
2021-08-05 17:04:06 -07:00
Colin Cross
5f821d081a Merge "Revert "Pass jars with resources to R8"" am: 93fb53f5d0 am: e8332a9fde am: 4175ce628e am: 2c203ad146
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788367

Change-Id: I667c11510d38c2098fe9d4234cc5f91cc0a099d9
2021-08-05 16:25:26 +00:00
Colin Cross
4175ce628e Merge "Revert "Pass jars with resources to R8"" am: 93fb53f5d0 am: e8332a9fde
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788367

Change-Id: I97069bca283f0f68c4f14ad1db15ea6ca3254b86
2021-08-05 15:54:07 +00:00
Colin Cross
93fb53f5d0 Merge "Revert "Pass jars with resources to R8"" 2021-08-05 15:25:25 +00:00
Colin Cross
1d73c7316c Revert "Pass jars with resources to R8"
This reverts commit 05ca7c8769.

Reason for revert: b/195644067

Flaky failure with "missing in.jar" error.

Change-Id: Id2d6452de1e43951bc58f0bfb8e20d5ad65ce830
2021-08-05 15:16:11 +00:00
Colin Cross
6a843f33cd Merge "Pass jars with resources to R8" am: ac33aac0aa am: 7f47b50ef6 am: a818133f24 am: 5a666a3519
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1786607

Change-Id: If2910e9550b30ed5ff830a782ee968a16fd7ed3b
2021-08-05 02:35:34 +00:00
Colin Cross
a818133f24 Merge "Pass jars with resources to R8" am: ac33aac0aa am: 7f47b50ef6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1786607

Change-Id: Id5782f3903cf4b29e22da3f0ee4ab3f0c6e518a4
2021-08-05 02:11:16 +00:00
Colin Cross
ac33aac0aa Merge "Pass jars with resources to R8" 2021-08-05 01:41:32 +00:00
Colin Cross
05ca7c8769 Pass jars with resources to R8
R8 will parse proguard files out of resources in injars.  Use the jar
with resources instead of the classes jar so that R8 can see the
proguard files.

R8 fails when an input jar contains dex files, so filter out dex files
from the input jar before passing it to r8.

Bug: 195558228
Test: m checkbuild
Change-Id: Ibb870ee9c70470336f542a3b7542dab86716dbf8
2021-08-04 14:57:45 -07:00
Treehugger Robot
8dbef1f9f2 Merge "Update documentation for genrule and sdk_library" am: 8662a3793b am: 099a42701a am: f087512f38 am: 89be6a1480
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1780976

Change-Id: I10ce14f2befbd2691adae8a36357031eea3506aa
2021-08-04 01:22:09 +00:00
Treehugger Robot
f087512f38 Merge "Update documentation for genrule and sdk_library" am: 8662a3793b am: 099a42701a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1780976

Change-Id: I1488e1e4f79527280c11656de90e9e5121c6d319
2021-08-04 00:48:06 +00:00
Treehugger Robot
8662a3793b Merge "Update documentation for genrule and sdk_library" 2021-08-04 00:14:31 +00:00
Spandan Das
93e95992a4 Update documentation for genrule and sdk_library
1. Documentation for genrule and sdk_library was missing a period, which
has been added now. For
genrule, Before:
https://android-build.googleplex.com/builds/submitted/7594870/linux/latest/view/genrule.html,
After:
https://x20web.corp.google.com/users/sp/spandandas/soong_docs/genrule.html

2. Documentation for genrule was missing definition of $(locations),
which has been added now

Bug: 194231221
Test: m soong_docs
Change-Id: Ia367f13055c110d92a491a9c1b1af4113f66b296
2021-07-30 00:25:20 +00:00
satayev
685e463147 Merge "Rename UpdatableSystemServerJars to ApexSystemServerJars." am: 0d8c497535 am: 59eb1584f6 am: c3c6b6b666 am: d4244ca7b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1779990

Change-Id: Ic5269b9bb7133cbfaf8fa5e9c4db9df46efd3e4c
2021-07-29 12:23:03 +00:00
satayev
c3c6b6b666 Merge "Rename UpdatableSystemServerJars to ApexSystemServerJars." am: 0d8c497535 am: 59eb1584f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1779990

Change-Id: I31b7d16d1f66b08f74469c0593ba3b6c11191c52
2021-07-29 11:56:03 +00:00
satayev
0d8c497535 Merge "Rename UpdatableSystemServerJars to ApexSystemServerJars." 2021-07-29 11:23:43 +00:00
Rupert Shuttleworth
c2e74aef19 Merge "Add initial bp2build support for converting android_app_certificate modules." am: 569a23ae00 am: b48abbcd56 am: 4c93b1dcf7 am: 3fe3d0dc3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1780168

Change-Id: I106c0ab6fd9257c570340eb93c4c5c7483b378bc
2021-07-28 13:20:56 +00:00
satayev
492b17d533 Rename UpdatableSystemServerJars to ApexSystemServerJars.
This is consistent with naming for boot jars, e.g. ApexBootJars.

Bug: 191127295
Test: presubmit
Change-Id: I6e8828d55ac86b7f5260ed7f8d4eca1c0b3dced8
2021-07-28 14:04:49 +01:00
Rupert Shuttleworth
4c93b1dcf7 Merge "Add initial bp2build support for converting android_app_certificate modules." am: 569a23ae00 am: b48abbcd56
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1780168

Change-Id: Id7b661fd6d760da4f4514523c7603b8e2cfd6634
2021-07-28 12:49:07 +00:00
Rupert Shuttleworth
5c4881c8ec Add initial bp2build support for converting android_app_certificate modules.
Test: Added unit test.

Change-Id: Ib5bf1711eca5be772e1bed73663dcb86252e0b4a
2021-07-28 06:51:07 -04:00
Rupert Shuttleworth
4515c7d2a4 Add some more properties to the bp2build APEX converter (second try) am: 6e4950a061 am: 6de2c9b72b am: d0ec532fa6 am: 2593fc4e96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1778212

Change-Id: I8945628c883dba58e927379a450e5897e11cf6d7
2021-07-27 12:31:45 +00:00
Rupert Shuttleworth
d0ec532fa6 Add some more properties to the bp2build APEX converter (second try) am: 6e4950a061 am: 6de2c9b72b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1778212

Change-Id: Ic13b56e93a31357887d37c21952d5a2fe8d85d87
2021-07-27 10:57:03 +00:00
Rupert Shuttleworth
6e4950a061 Add some more properties to the bp2build APEX converter (second try)
In particular:

- AndroidManifest
- file_contexts
- key
- certificate
- min_sdk_version
- updatable
- installable
- native_shared_libs
- binaries

Test: Updated unit test

Change-Id: I1c6e8c4b6b24ce487f64e5d37bd594dbb000fe6f
2021-07-27 05:02:50 -04:00
Rupert Shuttleworth
e95a5baace Merge "Revert "Add some more properties to the bp2build APEX converter."" am: d0e6ad1ab3 am: 8ed074029d am: 53b662e2f3 am: 5d4f209a69
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1778407

Change-Id: I4cdea5e60517a5918f251e5d957f749894ce8870
2021-07-27 03:51:59 +00:00
Treehugger Robot
aa8d1a13f0 Merge "Add some more properties to the bp2build APEX converter." am: 57dd3c40e8 am: 23c45bb446 am: b97add46c7 am: 422d4fa80b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1778085

Change-Id: Ibe1606b7340872f9f964acffa14bdbf4792098d5
2021-07-27 03:35:55 +00:00
Rupert Shuttleworth
53b662e2f3 Merge "Revert "Add some more properties to the bp2build APEX converter."" am: d0e6ad1ab3 am: 8ed074029d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1778407

Change-Id: I732ad6808d71b32642fb5892387a6500c31af9d3
2021-07-27 03:25:29 +00:00
Treehugger Robot
b97add46c7 Merge "Add some more properties to the bp2build APEX converter." am: 57dd3c40e8 am: 23c45bb446
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1778085

Change-Id: I7274c07caeee96306b69172793a9c9699839b35b
2021-07-27 03:02:43 +00:00
Rupert Shuttleworth
d0e6ad1ab3 Merge "Revert "Add some more properties to the bp2build APEX converter."" 2021-07-27 02:56:56 +00:00
Rupert Shuttleworth
0358478150 Revert "Add some more properties to the bp2build APEX converter."
This reverts commit 69bf4c0d60.

Reason for revert: Possibly broke CI (https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master-bazel&target=bp2build-incremental&lkgb=7266256&fkbb=7237028), rolling back just in case...

Change-Id: I14ebac4f47576a73285d1f724ae4499036e8e678
2021-07-27 02:37:32 +00:00
Treehugger Robot
57dd3c40e8 Merge "Add some more properties to the bp2build APEX converter." 2021-07-27 02:17:51 +00:00
satayev
1aa4621656 Merge "Rename UpdatableBootJars to ApexBootJars." am: 4102c0cc47 am: adb9e9f752 am: ad6cb082a4 am: 0c57c91e45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773912

Change-Id: I1a4463251cddbd51838bf766509caf75ae0efc37
2021-07-27 01:56:13 +00:00
Treehugger Robot
85aa681623 Merge "Disable lint checks which do not apply in the platform" am: 04f3f07752 am: 918a5ba519 am: 46afb55f63 am: 7cd93eb9ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1777154

Change-Id: Ie7ea684498dad8c5652c5897fe192c4c28894aa3
2021-07-26 20:06:12 +00:00
satayev
ad6cb082a4 Merge "Rename UpdatableBootJars to ApexBootJars." am: 4102c0cc47 am: adb9e9f752
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773912

Change-Id: Iecc5f48620b2d4e5390ab9a081b2193924bd0dda
2021-07-26 18:29:56 +00:00
satayev
4102c0cc47 Merge "Rename UpdatableBootJars to ApexBootJars." 2021-07-26 17:59:36 +00:00
Rupert Shuttleworth
69bf4c0d60 Add some more properties to the bp2build APEX converter.
In particular:

- AndroidManifest
- file_contexts
- key
- certificate
- min_sdk_version
- updatable
- installable
- native_shared_libs
- binaries

Test: Updated unit test

Change-Id: I9ea13f021d63ec0f75006b3b0b23ec8178c7e9da
2021-07-26 07:32:36 -04:00
Treehugger Robot
46afb55f63 Merge "Disable lint checks which do not apply in the platform" am: 04f3f07752 am: 918a5ba519
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1777154

Change-Id: I7251844f581917e54763b6bbdaa5d741a2bcb27c
2021-07-24 16:42:33 +00:00
Treehugger Robot
04f3f07752 Merge "Disable lint checks which do not apply in the platform" 2021-07-24 16:10:31 +00:00
Tor Norbye
b015aecbfe Disable lint checks which do not apply in the platform
Lint is primarily targeted at Android app developers, and some of the
checks reflect that. Some of these checks do not apply to the platform
code, where they can produce false positives.

This CL adds a number of these to an exclude list passed in to lint.
Also reenables a check previously disabled because of a bug which has
since been fixed, HardcodedDebugMode, and downgrades from error to
warning a few more lint checks which have existing violations in the
codebase when lint is upgraded to the latest version.

Test: Existing
Bug: None
Change-Id: Icbfbcfd51516c43c342e0d3cdb6973278110fd35
2021-07-24 14:48:19 +00:00
Joseph Murphy
15878a947d Merge "Changes tree built Robolectric name" 2021-07-23 20:31:49 +00:00
Colin Cross
acf474e9bb Merge "Replace android.BuildOs with Config.BuildOS" am: 78fd15f7d6 am: bf2f93f8e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773108

Change-Id: Ib6e5eea644f359c59e597943222d3f1f51b564d0
2021-07-23 00:39:59 +00:00
Colin Cross
78fd15f7d6 Merge "Replace android.BuildOs with Config.BuildOS" 2021-07-23 00:07:01 +00:00
satayev
d604b210c4 Rename UpdatableBootJars to ApexBootJars.
Note that ART apex boot jars and core-icu4j are exceptions here as they
are not part of ApexBootJars. ART apex boot jars are defined in their
own variable, while core-icu4j is treated as a regular non-updatable
boot jar.

Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I3cea3d82ef521655a1a5ffa8cae2258ab9d08bfc
2021-07-22 17:35:42 +01:00
Paul Duffin
b16974e755 Merge "Remove unnecessary dedup logic" am: 719371072f am: 916f3b6bb1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1772631

Change-Id: I4c6d869c8f1a1e1e775b1ade124ddc13f2ef0388
2021-07-21 11:36:17 +00:00
Paul Duffin
2874b49915 Merge "Remove unnecessary handling of nil paths in HiddenAPIOutput" am: 38788dce43 am: b4186d80f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1772630

Change-Id: Ib59c0db2ad05461c5245e6457a643d677ca574ca
2021-07-21 11:36:12 +00:00
Paul Duffin
f87a63a6bc Merge "Remove fallback to classes jars from bootclasspath_fragment" am: 880a3971a6 am: b008abf0c8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1772629

Change-Id: I2905f2d33f7f033e3e609aec4a307b05eea9c075
2021-07-21 11:35:57 +00:00
Joseph Murphy
2017967487 Changes tree built Robolectric name
Bug: b/194219998
Test: locally ran all in-tree Robolectric tests
Change-Id: If13583f6a2882e2e78d3004afc476debf6692df9
2021-07-20 16:08:19 -07:00
Paul Duffin
6e9bc01b97 Remove unnecessary dedup logic
The CreateClasspathElements function makes sure that each standalone
library and bootclasspath_fragment on the platform bootclasspath
appear once and once only and each file extracted is unique to the
module so there is no chance that any duplicate files will be used.

Bug: 194063708
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      - check that this does not change the contents.
Change-Id: I60c02baa4d179293ee0f305375afaa3a8c98e112
2021-07-20 22:02:44 +01:00
Paul Duffin
ed12c132c3 Remove unnecessary handling of nil paths in HiddenAPIOutput
Previously, bootclasspath_fragment modules could produce
HiddenAPIOutput structs containing nil paths. That is no longer
possible as both source and prebuilt bootclasspath_fragment modules
always provide non-nil paths so this change removes the special
handling.

Bug: 194063708
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      - check that this does not change the contents.
Change-Id: I15337e146c9e694ce9da06ad4845ac267d6da27a
2021-07-20 22:02:44 +01:00