Commit Graph

38138 Commits

Author SHA1 Message Date
Treehugger Robot
a868f0ff32 Merge "Revert "Export implementation class jars for java_boot_libs"" am: 52cc87959b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768945

Change-Id: I7623a3f94150212349074da3312c44568851946d
2021-07-19 10:10:26 +00:00
Treehugger Robot
2e8ae7ac7b Merge "Make bootclasspath_fragments always perform hidden API processing" am: 452366ab0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1748478

Change-Id: Ic7be8efeb374ca7c448afdeb501e265674f6d8b3
2021-07-19 10:10:20 +00:00
Treehugger Robot
52cc87959b Merge "Revert "Export implementation class jars for java_boot_libs"" 2021-07-19 09:49:17 +00:00
Treehugger Robot
452366ab0c Merge "Make bootclasspath_fragments always perform hidden API processing" 2021-07-19 09:48:07 +00:00
Jingwen Chen
24bc7c3246 Merge "Soong OWNERS: add more folks and categorize by timezones." am: 3a7b03c017
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1733747

Change-Id: Iffc2c875fae98c3b23c34210afa33a70acdcb857
2021-07-19 05:25:04 +00:00
Jingwen Chen
d3f17aed08 Merge "Fix apex bp2build." am: 8bdc1bb3d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1769290

Change-Id: Ic2f058ae505c4fb87ad1c7f2d51097d9dd620769
2021-07-19 05:24:56 +00:00
Jingwen Chen
3a7b03c017 Merge "Soong OWNERS: add more folks and categorize by timezones." 2021-07-19 05:16:10 +00:00
Jingwen Chen
8bdc1bb3d7 Merge "Fix apex bp2build." 2021-07-19 05:10:59 +00:00
Paul Duffin
9c0d3f912a Merge "Avoid permitted_packages related build failures in unbundled builds" am: 393bffee78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768416

Change-Id: I7d982db3d688644efe6e4bd96bcfe5ccb24c0fe2
2021-07-16 19:21:08 +00:00
Treehugger Robot
a57b988393 Merge "Use note in linker.s to place linker" am: b68048e520
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1765066

Change-Id: I3543ca4a24335ad87358cf7ebd878f9947f5a52c
2021-07-16 19:12:06 +00:00
Paul Duffin
393bffee78 Merge "Avoid permitted_packages related build failures in unbundled builds" 2021-07-16 19:06:20 +00:00
Treehugger Robot
b68048e520 Merge "Use note in linker.s to place linker" 2021-07-16 19:02:27 +00:00
Paul Duffin
5c21145915 Revert "Export implementation class jars for java_boot_libs"
This reverts commit 22ff0aaf51.

The workaround to support hidden API generation with prebuilts by
passing the full implementation jars through to the SDK snapshot is no
longer needed as the monolithic hidden API flag generation uses the
prebuilt flag files that are already part of the snapshot.

This change reverts that previous workaround.

Bug: 192868581
Test: - Update the prebuilts
      DIST_DIR=$PWD/dist TARGET_BUILD_VARIANT=userdebug art/build/build-art-module.sh --skip-apex
      packages/modules/ArtPrebuilt/update-art-module-prebuilts.py --local-dist=dist --skip-cls --skip-apex
      - Build hidden API flags to make sure it does not fail
Change-Id: Idb3fde6f7dcb171677316d8794a4af91ede1f7e0
2021-07-16 17:04:21 +01:00
Paul Duffin
3bc8e218f9 Avoid permitted_packages related build failures in unbundled builds
Unbundled builds cause AlwaysUsePrebuiltSdks() to return true which
causes java_sdk_library_import modules to be preferred instead of their
corresponding java_sdk_library module. That causes the
platform-bootclasspath module to depend on prebuilt versions of modules
like framework-statsd which currently do not specify
permitted_packages and so cause a failure.

This is a temporary hack to prevent an unbundled build from checking
for permitted_packages. It can be removed once the prebuilts have been
updated to include the permitted_packages.

Bug: 193095050
Bug: 193889859
Test: m TARGET_BUILD_APPS=Calendar apps_only
      - before the change it failed in Soong.
      - after the change it started failing, later in Make, so the
        Soong problem has been worked around.
      - I reverted all the recent changes to permitted_packages and
        ran this and it still failed so that failure is unrelated to
        these changes.
Change-Id: I213d35437d76d61cf616d1f16dae213b311c6c8e
2021-07-16 17:03:17 +01:00
Ulyana Trafimovich
63277a3aa7 Merge "Don't attempt to add stub libraries to class loader context." am: fe261473b8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768125

Change-Id: I2a8d2c57bed9c1649b7f5305a6fcb558aec2e62f
2021-07-16 16:02:36 +00:00
Ulyana Trafimovich
fe261473b8 Merge "Don't attempt to add stub libraries to class loader context." 2021-07-16 15:45:19 +00:00
Ivan Lozano
ee205c588b Merge "rust: Remove libtest from stdlibs list" am: 2bd6cce95a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768847

Change-Id: Id3c3179072964df7122145bc5012393d3deaf57e
2021-07-16 15:00:33 +00:00
Ivan Lozano
2bd6cce95a Merge "rust: Remove libtest from stdlibs list" 2021-07-16 14:44:25 +00:00
Paul Duffin
da286f4615 Make bootclasspath_fragments always perform hidden API processing
Previously, bootclasspath_fragment modules would only perform hidden
API processing if they provided some stub libraries and fragments. That
was needed because the bootclasspath_fragment modules were added before
Soong supported hidden API processing on all the different modules and
before they all provided the necessary information that hidden API
processing required.

This change stops hidden API being conditional as it is no longer
required as it has been enabled on all existing bootclasspath_fragment
modules.

Bug: 179354495
Test: m nothing
Change-Id: I0cbf11986adff1f2f967b96f86e6bfe0e9b8b1ef
2021-07-16 15:09:59 +01:00
Ulya Trafimovich
840efb6661 Don't attempt to add stub libraries to class loader context.
A Java module may depend on a stub library. In that case an additional
dependency on the implementation library is created, and it is used to
add the implementation library to class loader context. We should not
attempt to add the stubs library as well (previously the attempt to add
it happend after the implemention was added to CLC, to the attempt was
unsuccessful).

Raise an error if someone tries to add the same library with different
build/instal paths.

Also, rename local variable `implicitSdkLib` to `sdkLib` to better
reflect its meaning.

Bug: 193425964

Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd
      $ adb wait-for-device && \
        adb root && \
        adb logcat | \
        grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C1
      # empty output, no errors
Change-Id: I01c1bdd23f9d118d891d0b806e7e3b4d78896a34
2021-07-16 14:44:18 +01:00
Ulyana Trafimovich
7a1642c416 Merge "Fix handling of "prebuilt_" prefix in classLoaderContextForUsesLibDeps." am: f87aae5356
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768131

Change-Id: I864468cd7fa93e55f73328433ff95e05a94027ff
2021-07-16 12:20:44 +00:00
Ulyana Trafimovich
f87aae5356 Merge "Fix handling of "prebuilt_" prefix in classLoaderContextForUsesLibDeps." 2021-07-16 12:00:29 +00:00
Ulyana Trafimovich
de136dec72 Merge "Refactor function to reduce nestedness level. No functional changes." am: 9cb1577ac7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768130

Change-Id: Iee12737d59c5529868543a9a0f61f0c1fc3c328f
2021-07-16 09:56:22 +00:00
Ulyana Trafimovich
9cb1577ac7 Merge "Refactor function to reduce nestedness level. No functional changes." 2021-07-16 09:37:00 +00:00
Jingwen Chen
f59a8e117e Fix apex bp2build.
apexBundle was missing InitBazelModule for it to have bazel_module properties.

Test: soong unit test
Fixes: 193866723
Change-Id: I5fb38c8b2e8edaecef44162491d399c0223d3fb1
2021-07-16 09:32:49 +00:00
Jingwen Chen
6dcca41d76 Soong OWNERS: add more folks and categorize by timezones.
Test: N/A
Change-Id: Ifc16654d1a295fe341b982319101be9c8c170113
2021-07-16 07:25:00 +00:00
Colin Cross
ac5a348ce9 Merge "Rename ninja variables with Clang in the name" am: 51736b82fc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1767413

Change-Id: I897f6d3127ca841f06edac146a872a16c0336956
2021-07-16 00:48:53 +00:00
Colin Cross
51736b82fc Merge "Rename ninja variables with Clang in the name" 2021-07-16 00:28:13 +00:00
Colin Cross
a103247992 Merge changes I29bf144b,Id2879453 am: 908fbe200e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1767412

Change-Id: Iaa0d26511b9028cd2593ca4992deb7f07fe4f50f
2021-07-16 00:15:40 +00:00
Colin Cross
908fbe200e Merge changes I29bf144b,Id2879453
* changes:
  Remove more clang indirection without affecting command lines
  Remove clang indirection without affecting build.ninja
2021-07-16 00:00:22 +00:00
Liz Kammer
56008abd97 Merge "Add test to reproduce bug in error message." am: c07b16f49c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768625

Change-Id: Iee7c52b166bad9a0d1d0c8b7ef22cbd87fb74c39
2021-07-15 21:26:43 +00:00
Liz Kammer
c07b16f49c Merge "Add test to reproduce bug in error message." 2021-07-15 20:37:52 +00:00
Ivan Lozano
3ee74c8252 rust: Remove libtest from stdlibs list
libtest does not need to be linked for every module type, so remove it
from the stdlibs list. Instead, link it only when building benchmarks or
tests.

Bug: 193782599
Test: cd external/rust/crates/; mma
Test: Rust tests still run correctly.
Change-Id: I536be8754da0987e09340744d9ebf668b8e734d0
2021-07-15 15:45:31 -04:00
Martin Stjernholm
337f8cc2f2 Merge "Document how APEXes are identified in the boot jar variables." am: 9fe17bc8d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1756729

Change-Id: If0bd4088434367c4dcb7b3a768916fe609e140d3
2021-07-15 19:33:34 +00:00
Martin Stjernholm
9fe17bc8d9 Merge "Document how APEXes are identified in the boot jar variables." 2021-07-15 18:57:00 +00:00
Liz Kammer
0fc1e134b9 Add test to reproduce bug in error message.
soong config variable modules allow specifying a non-existent property,
which results in an unhelpful error message when the module type is then
used.

Bug: 171232169
Test: go test soong tests
Change-Id: I6174c0d35a28952157ee925f51d615e2ee735f8a
2021-07-15 12:38:35 -04:00
Paul Duffin
bd01c983d3 Merge "Support fully qualified names in android:"path" properties" am: 9e3e9c905b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1761491

Change-Id: I23f53b86ff0380d92e15af22ba8f9d30959bbd0c
2021-07-15 16:19:51 +00:00
Paul Duffin
9e3e9c905b Merge "Support fully qualified names in android:"path" properties" 2021-07-15 16:02:34 +00:00
Paul Duffin
3caa3a02ee Merge "Build updatable-bcp-packages.txt from prebuilts in sdk snapshot" am: d2a23518b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768127

Change-Id: Icfd614f4ec1ae722e742cbf98eb58a2a71d09f1d
2021-07-15 15:10:44 +00:00
Paul Duffin
fcbeaa37a8 Merge "Propagate permitted packages to sdk snapshot" am: 81d56dcd3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768128

Change-Id: I0319ea86d5d966892a6b02c6a52100475306c056
2021-07-15 15:10:38 +00:00
Paul Duffin
d2a23518b4 Merge "Build updatable-bcp-packages.txt from prebuilts in sdk snapshot" 2021-07-15 14:58:12 +00:00
Paul Duffin
81d56dcd3f Merge "Propagate permitted packages to sdk snapshot" 2021-07-15 14:58:03 +00:00
Ulya Trafimovich
e14f80b2d3 Fix handling of "prebuilt_" prefix in classLoaderContextForUsesLibDeps.
Changes:
- Cut off "prebuilt_" prefix from `dep`, not `libName`, because `dep` is
  used to replace library name in `usesLibraryProperties`, and these
  properties are specified without "prebuilt_" prefix.

- Do not remove "prebuilt_" prefix on the return value of
  `ProvidesUsesLib()`: this boils down to `provides_uses_lib` property
  which is specified without the prefix.

Bug: 193425964
Test: $ lunch aosp_cf_x86_64_phone-userdebug && m && launch_cvd
      $ adb wait-for-device && \
        adb root && \
        adb logcat | \
        grep -E 'ClassLoaderContext [a-z ]+ mismatch' -C1
      # empty output, no errors
Change-Id: I6cb65040027023d12ca0bc132d60c2c245174c40
2021-07-15 15:19:26 +01:00
Ulya Trafimovich
2444671b4a Refactor function to reduce nestedness level. No functional changes.
Bug: 193425964
Test: m nothing
Change-Id: Ic2d20eb5317f397919ecb01b64c5dd0da78e4a1a
2021-07-15 15:18:25 +01:00
satayev
8ed574e839 Merge "Update a comment about PRODUCT_UPDATABLE_BOOT_JARS." am: 1180b1fc4a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1768126

Change-Id: Ia6ef4362685a21790d926c6e749e7ea343ce873e
2021-07-15 14:15:31 +00:00
satayev
1180b1fc4a Merge "Update a comment about PRODUCT_UPDATABLE_BOOT_JARS." 2021-07-15 14:01:38 +00:00
Paul Duffin
630b11e9d4 Build updatable-bcp-packages.txt from prebuilts in sdk snapshot
Previously, the java_import and java_sdk_library_import modules did not
make their permitted_packages available to the rule that generates the
updatable-bcp-packages.txt file. This change corrects that.

Bug: 193763688
Test: m nothing
      - Added unit tests, which all failed and then fixed the tests.
Change-Id: If0706e4551a331b48d383123088e63924dded48b
2021-07-15 14:16:44 +01:00
Liz Kammer
7bce37e093 Merge "Include bazel-status of build in metrics" am: da29c65eb6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1766626

Change-Id: I3452f7976a18fbc85eb47cabe701b0b3260c0b3b
2021-07-15 13:16:30 +00:00
Paul Duffin
869de147ab Propagate permitted packages to sdk snapshot
Previously, permitted_packages were not copied to the sdk snapshot.
This change corrects that.

Bug: 193763688
Test: m nothing
      - Added unit tests, which all failed and then fixed the tests.
Change-Id: I4560987f746f78c0ae706058195b6db4bea438aa
2021-07-15 14:15:58 +01:00
Liz Kammer
da29c65eb6 Merge "Include bazel-status of build in metrics" 2021-07-15 12:58:04 +00:00