Commit Graph

5354 Commits

Author SHA1 Message Date
Aurimas Liutikas
e92bc9fcbd Merge "Fix the way manifest fixer detects optional <uses-library> entries." am: 15c82a10de am: 4926ea3b85 am: 75b5b21ad2 am: 237d9d0ba2 am: 27a5a91bfe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1794528

Change-Id: I204e6ed4fabf468ae74a59ec0db19726c4284415
2021-08-13 22:46:31 +00:00
Aurimas Liutikas
75b5b21ad2 Merge "Fix the way manifest fixer detects optional <uses-library> entries." am: 15c82a10de am: 4926ea3b85
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1794528

Change-Id: I34c6ec166ad18df7e215efe1130b0319db3723eb
2021-08-13 21:50:36 +00:00
Aurimas Liutikas
15c82a10de Merge "Fix the way manifest fixer detects optional <uses-library> entries." 2021-08-13 21:00:35 +00:00
Ulya Trafimovich
fc0f6e34ce Fix the way manifest fixer detects optional <uses-library> entries.
Previously manifest_fixer used a naive way to distiniguish optional libs
from required ones: it checked if a library is on the list of optional
compatibility libraries. This works for compatibility libs, but not for
other libs.

Now we properly track optionality through all stages of the build,
starting with the addition of the library as a dependency (here's where
the `uses_libs`/`optional_uses_libs` distinction kicks in), store it in
dependency tag and propagate to class loader context, and from there to
the manifest_fixer.

The tests have been updated accordingly.

Bug: 196377222
Test: lunch bertha_x86_64-userdebug && m droid dist cts mts
Change-Id: I3631ce59ebe47116ce7a9b3d33a86f636846ef0f
2021-08-13 16:10:42 +01:00
Paul Duffin
4755baf365 Merge "Filter blocked entries from modular flag files" am: 1f0cc77010 am: 78fc6dc40a am: d483d1ac66 am: 3942461ef6 am: ac6de1f2d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788095

Change-Id: I9bc4592e14ca9ab51ad281c26d72005a292ddc5c
2021-08-11 19:50:51 +00:00
Paul Duffin
d483d1ac66 Merge "Filter blocked entries from modular flag files" am: 1f0cc77010 am: 78fc6dc40a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788095

Change-Id: I377eee1d14a930d00f944522d1cc71cd43411175
2021-08-11 19:07:45 +00:00
Paul Duffin
1f0cc77010 Merge "Filter blocked entries from modular flag files" 2021-08-11 18:36:37 +00:00
satayev
b438641e04 Merge "Fix tests to use correct fixtures for configuring (Apex)BootJars." am: 721f42d12a am: 9958b36643 am: 4d566bea9b am: e0a651cd6f am: 6e259ef3b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1787998

Change-Id: Iffb91c2f1504bd94071ef55cdfd1457880884e7a
2021-08-11 17:22:39 +00:00
satayev
4d566bea9b Merge "Fix tests to use correct fixtures for configuring (Apex)BootJars." am: 721f42d12a am: 9958b36643
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1787998

Change-Id: Id9248b6b54547e55c28bb386c867294ec20df873
2021-08-11 16:42:47 +00:00
Paul Duffin
280bae6d20 Filter blocked entries from modular flag files
Previously, the sdk snapshot would include all the entries from the
stub-flags.csv and all-flags.csv modular files generated by a single
bootclasspath_fragment. That included implementation details, i.e.
class members that are not part of a stable API or the hidden API which
meant that the sdk snapshots were implementation dependent.

This change removes the implementation details from the modular flag
files, i.e. those entries that are only marked as "blocked". When
comparing the files against the corresponding subset of the monolithic
files it assumes that any entries missing from the modular flag files
are blocked.

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: I6b67b2253cf029d6830b58a06ebb0c8fcaa0dd71
2021-08-11 17:29:47 +01:00
satayev
721f42d12a Merge "Fix tests to use correct fixtures for configuring (Apex)BootJars." 2021-08-11 16:13:20 +00:00
Colin Cross
f60e88cb5a Merge "Collect lint reports from apps in apexes" am: 7131982a76 am: 3dc9d726ed am: 390babfeae am: eacc925c4d am: 8f8c6143ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1792871

Change-Id: Iebf19e9aa1532d7dd768307148c6ab3eacf2dab4
2021-08-11 15:28:54 +00:00
Colin Cross
390babfeae Merge "Collect lint reports from apps in apexes" am: 7131982a76 am: 3dc9d726ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1792871

Change-Id: Ibc44f45a5a8a5ecb977943a2beb26e6e1e465862
2021-08-11 14:44:08 +00:00
Colin Cross
8355c1524f Collect lint reports from apps in apexes
Lint reports were only being collected from jars in apexes, not
apps.

Bug: 188772607
Test: mainline_modules_arm64 build
Change-Id: Ie84819343f8b8ab3f43496bbc9b7876d0d0d8e70
2021-08-10 19:25:59 -07:00
satayev
abcd59731e Fix tests to use correct fixtures for configuring (Apex)BootJars.
This is in preparation to r.android.com/1740313 where setting correct
variables would be enforced (i.e. apex and non-apex boot jars must be in
config.ApexBootJars and config.BootJars correspondingly).

Bug: 191369843
Test: m nothing
Change-Id: Ic86680c1f7af53d229083b2cc58beb3ceccb4b6a
2021-08-10 15:35:52 +01:00
Colin Cross
d0f5eda58d Merge "Reland: Pass jars with resources to R8" am: 795a9f99f4 am: bb5e173587 am: f1a6c775c2 am: b52a5e8f20
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788754

Change-Id: Icd0ae5cb48b28072457a112a85aa11f3e19e74ee
2021-08-06 20:03:41 +00:00
Colin Cross
f1a6c775c2 Merge "Reland: Pass jars with resources to R8" am: 795a9f99f4 am: bb5e173587
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788754

Change-Id: I77b353b14f7f86b36ce7db8cc946a9c11c4f6b81
2021-08-06 19:15:47 +00:00
Colin Cross
6854848b31 Merge changes Ia0c3826a,I92ad6635 am: 03349188bc am: f1338a63f7 am: f2b08a4d4e am: d5c8543ad3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788753

Change-Id: Iead08f0118ab150b4f2d4a75bf48d77b8425ec1a
2021-08-06 19:00:18 +00:00
Colin Cross
795a9f99f4 Merge "Reland: Pass jars with resources to R8" 2021-08-06 18:33:23 +00:00
Colin Cross
f2b08a4d4e Merge changes Ia0c3826a,I92ad6635 am: 03349188bc am: f1338a63f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788753

Change-Id: I0c3816d2606531aa25e35c433719876a52df511c
2021-08-06 18:17:43 +00:00
Colin Cross
03349188bc Merge changes Ia0c3826a,I92ad6635
* changes:
  Revert "Time out and dump stacks from R8 processes after 30 minutes"
  Add more debugging to run_with_timeout
2021-08-06 17:47:49 +00:00
Paul Duffin
5dc2473179 Export signature patterns to sdk snapshot am: 8d007e9919 am: 3e2c442d58 am: 9569137e33 am: 6abb84a09f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788092

Change-Id: Ifada515077a836ab16867b2b08ff5e21c768530a
2021-08-06 16:52:08 +00:00
Paul Duffin
bd6d63370b Separate creation of signature patterns from overlap checking am: 67b9d61ac2 am: 0623c3e8f9 am: b32b624d71 am: 475968b5b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788091

Change-Id: I4726bd873538233660babaa7c831c8b1536edeca
2021-08-06 16:52:01 +00:00
Paul Duffin
9569137e33 Export signature patterns to sdk snapshot am: 8d007e9919 am: 3e2c442d58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788092

Change-Id: I196e1c4f176c7c3b6b43fd9fd3cfa193a6c1d0f7
2021-08-06 16:39:20 +00:00
Paul Duffin
b32b624d71 Separate creation of signature patterns from overlap checking am: 67b9d61ac2 am: 0623c3e8f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788091

Change-Id: If9d75256940429dbf6890ca5a07d1806b81e6c53
2021-08-06 16:39:14 +00:00
Paul Duffin
8d007e9919 Export signature patterns to sdk snapshot
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: Ic819def9b0c41e3b22fb98582cd39f6d27080a32
2021-08-06 14:11:14 +01:00
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