Commit Graph

44539 Commits

Author SHA1 Message Date
Treehugger Robot
550ed75031 Merge "Support exporting device arch toolchain info" am: 6fd3047115 am: 97cc383f00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1784827

Change-Id: Ia6e381669455b567356acf0d7350521c5cb42a01
2021-08-10 16:45:25 +00:00
Treehugger Robot
97cc383f00 Merge "Support exporting device arch toolchain info" am: 6fd3047115
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1784827

Change-Id: I8b3080e73d56162285072047d273b89277a692eb
2021-08-10 16:27:30 +00:00
Treehugger Robot
6fd3047115 Merge "Support exporting device arch toolchain info" 2021-08-10 16:11:52 +00:00
Paul Duffin
10e42b13c2 Merge "Use trie to store monolithic hidden API flags" am: 8f34b0e19d am: f94af2bc8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788093

Change-Id: I01d1c17a062f55093f6743dd53b9c762e8bf2d27
2021-08-10 09:56:28 +00:00
Paul Duffin
f94af2bc8c Merge "Use trie to store monolithic hidden API flags" am: 8f34b0e19d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788093

Change-Id: I8cf961a7aa3ca6d883eec0472aeda875b58ae317
2021-08-10 09:41:55 +00:00
Paul Duffin
8f34b0e19d Merge "Use trie to store monolithic hidden API flags" 2021-08-10 09:26:56 +00:00
Chris Wailes
17c20f5c91 Clean up generated rust-project.json files am: 353405d9fb am: e1c6783bc1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1790960

Change-Id: Ia0fd7c07cc3181dfdf5e638b95bc4890444ae532
2021-08-10 01:53:32 +00:00
Chris Wailes
e1c6783bc1 Clean up generated rust-project.json files am: 353405d9fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1790960

Change-Id: I7b31a68edc398f8b75f6ba091addeb9e4f4ff0cf
2021-08-10 01:41:38 +00:00
Chris Wailes
353405d9fb Clean up generated rust-project.json files
This CL removes the roots section from the rust-projects.json file as it
is no longer required by the rust-analyzer tool.

Bug: 162055556
Test: prebuilts/rust/tests/rust-analyzer-integration-test.sh
Change-Id: I85c3277632c88394bc52e709ecce83f6aa1f2e0e
2021-08-09 15:50:39 -07:00
Christopher Parsons
6787777e06 Merge "bp2build: handle system_shared_libs" am: 67d6ccecfc am: 430c7d2c53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1783210

Change-Id: I7406a36873b6dc626cf89ceab6aa15d4aa05368c
2021-08-09 19:41:50 +00:00
Christopher Parsons
430c7d2c53 Merge "bp2build: handle system_shared_libs" am: 67d6ccecfc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1783210

Change-Id: I4b5f733e4213e8f6c79f824dd95975a071468cbc
2021-08-09 19:27:36 +00:00
Christopher Parsons
67d6ccecfc Merge "bp2build: handle system_shared_libs" 2021-08-09 19:11:00 +00:00
Paul Duffin
c11f6679d8 Use trie to store monolithic hidden API flags
Previously, a simple map from dex signature to the flags was used to
store the monolithic hidden API flags. This change replaces that with a
trie that uses packages and class names extracted from the signature
to map from the signature to the flags.

The signature is broken down into pieces consisting of package names,
class names and the remaining member signature. They are used in turn
to navigate through nodes in the trie to a Leaf that contains the flags
associated with the signature.

The flags can be retrieved from the trie in a number of ways:
* Using the complete signature to retrieve the flags for a single
  member.
* Using a class name to retrieve the flags for all the members in a
  class and any nested classes.
* Using a package wildcard to retrieve the flags for all the members in
  the classes in that package.
* Using a recursive package wildcard to retrieve the flags for all the
  members in the classes in that package and nested packages.

This will allow a bootclasspath_fragment to select a subset of the
monolithic flags to compare against itself without specifying the
signatures of every member of that set.

Before creating the trie an attempt was made to compute the subset by
iterating over all the signatures in the monolithic flags and matching
against a regular expression created from the patterns but that was too
slow. It took minutes to run whereas using the simple map or the trie
only takes a few seconds.

Bug: 194063708
Test: atest --host verify_overlaps_test
Change-Id: I36f5e319d3e7d62dd34305de1eec990a93cb3a89
2021-08-09 19:51:33 +01:00
Chris Parsons
51f8c39261 bp2build: handle system_shared_libs
- If no system_shared_libs is specified, bp2build writes no attribute
value. In this case, the bazel library macros determine the correct
default behavior.
- If any system_shared_libs is specified for any variant, then bp2build
writes the value verbatim. This includes if an empty list is specified,
as this should override defaulting behavior.

Note this defaulting behavior is incomplete and will be incorrect in
corner cases. For example, if, in an Android.bp, system_shared_libs is
specified for os.linux_bionic but not for os.android, then the bazel
default for os.android will be incorrect. However, there are no current
modules in AOSP which fit this case.

As a related fix, supports static struct for cc_library_static.

Also, removes some elements from the bp2build denylist.

Test: mixed_droid CI
Change-Id: Iee5feeaaf05e8e7209c7a90c913173832ad7bf91
2021-08-09 11:41:09 -04:00
Yabin Cui
5659921cbb Merge "Revert "Switch to clang r428724 13.0.1."" am: 01cad0cddc am: 04d221ad04
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1789927

Change-Id: Iaa0bbd11a3ab4b60e0de49a814f55c7dd6570793
2021-08-08 21:31:34 +00:00
Yabin Cui
04d221ad04 Merge "Revert "Switch to clang r428724 13.0.1."" am: 01cad0cddc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1789927

Change-Id: I5c1b7c1a1b7c8a2c8e476ba63237ff3f3512dd80
2021-08-08 21:11:02 +00:00
Yabin Cui
01cad0cddc Merge "Revert "Switch to clang r428724 13.0.1."" 2021-08-08 21:02:29 +00:00
Yabin Cui
786c1d41ef Revert "Switch to clang r428724 13.0.1."
Revert submission 1743633-switch-to-clang-r428724

Reason for revert: fix build
Reverted Changes:
I824f3bc1c:Update bazel's clang version to clang-r428724
I6c4c26267:Adjust test for compiler update.
I94ab1f2dc:Switch to clang r428724 13.0.1.

Change-Id: I846e904b6e868d4e2be1bd8260ed59fc5464ef68
2021-08-08 20:59:59 +00:00
Yabin Cui
1d0eb600b3 Merge "Switch to clang r428724 13.0.1." am: baeca672c1 am: dd91217745
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743633

Change-Id: I136abfa3ae1a7de5e8d83819234753891df2ddca
2021-08-08 18:43:11 +00:00
Yabin Cui
dd91217745 Merge "Switch to clang r428724 13.0.1." am: baeca672c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1743633

Change-Id: I5251906a426a5dfee9dd04993b4e79b27bd22716
2021-08-08 18:30:32 +00:00
Yabin Cui
baeca672c1 Merge "Switch to clang r428724 13.0.1." 2021-08-08 18:20:22 +00:00
Kun Niu
f8c99a8012 Merge "Use prebuild modules even when coverage is enabled." into sc-dev am: fe1d6c535c
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15472697

Change-Id: If8bc890561f17a5179a8d655043be1ac36d165f2
2021-08-06 19:31:24 +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
Kun Niu
fe1d6c535c Merge "Use prebuild modules even when coverage is enabled." into sc-dev 2021-08-06 19:12:27 +00:00
Colin Cross
bb5e173587 Merge "Reland: Pass jars with resources to R8" am: 795a9f99f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788754

Change-Id: Ifb51c9bdfa509713859a417b2cd8b0cad67a9e9e
2021-08-06 18:59:30 +00:00
Colin Cross
795a9f99f4 Merge "Reland: Pass jars with resources to R8" 2021-08-06 18:33:23 +00:00
Yabin Cui
e87329c4c5 Switch to clang r428724 13.0.1.
Bug: http://b/190099451
Test: build and boot devices

Change-Id: I94ab1f2dc194ffcec5681708b558af26ced30aae
2021-08-06 18:28:08 +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
f1338a63f7 Merge changes Ia0c3826a,I92ad6635 am: 03349188bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788753

Change-Id: I921c6339f7e3f56421b0d5195fd65617d738d7ab
2021-08-06 18:05:11 +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
Stephen Hines
f325197225 Merge "Revert "Make DWARF v5 the default debug information format."" am: fe3bab726d am: 463011ccf9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788771

Change-Id: I0ec309672bc2c7ed8971791e0b942e6b7c564083
2021-08-06 17:46:31 +00:00
Stephen Hines
463011ccf9 Merge "Revert "Make DWARF v5 the default debug information format."" am: fe3bab726d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788771

Change-Id: I70c101136cca03f0756a930f6c564476e6313fa1
2021-08-06 17:25:08 +00:00
Stephen Hines
fe3bab726d Merge "Revert "Make DWARF v5 the default debug information format."" 2021-08-06 17:04:41 +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
3e2c442d58 Export signature patterns to sdk snapshot am: 8d007e9919
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788092

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

Change-Id: I8e4158cde756070327458afd5415e03ccda5bd54
2021-08-06 16:24:19 +00:00
Kousik Kumar
bd7264127c [automerger skipped] resolve merge conflicts of 233c1be0bd to rvc-dev am: 3c12576942 am: a907f283fc am: 0c49dac503 -s ours
am skip reason: Merged-In I416e8da75f84aa2b53995f525cf50501488dc972 with SHA-1 51c4091309 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15473760

Change-Id: Ibddffc562cda5e2369ea473dc549320876e183fe
2021-08-06 16:24:11 +00:00
Kousik Kumar
adbc840ea5 [automerger skipped] resolve merge conflicts of 233c1be0bd to rvc-dev am: 3c12576942 am: 4d645c7791 am: e8d959e5cf -s ours
am skip reason: Merged-In I416e8da75f84aa2b53995f525cf50501488dc972 with SHA-1 51c4091309 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15473760

Change-Id: I7de9d4511b12f9a91eb632eed5c2592a473f714c
2021-08-06 16:24:06 +00:00
Kousik Kumar
0c49dac503 resolve merge conflicts of 233c1be0bd to rvc-dev am: 3c12576942 am: a907f283fc
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15473760

Change-Id: I42938333328a0a42f99f80ba4b53e64b33935316
2021-08-06 16:09:04 +00:00
Kousik Kumar
e8d959e5cf resolve merge conflicts of 233c1be0bd to rvc-dev am: 3c12576942 am: 4d645c7791
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15473760

Change-Id: I5568c2f0fed211356a521bed0e26332e930bd22b
2021-08-06 16:03:42 +00:00
Kousik Kumar
a907f283fc resolve merge conflicts of 233c1be0bd to rvc-dev am: 3c12576942
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15473760

Change-Id: Ied3e486f490decd767d4ae3c7c63947bf41cdc64
2021-08-06 15:45:40 +00:00
Kousik Kumar
4d645c7791 resolve merge conflicts of 233c1be0bd to rvc-dev am: 3c12576942
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/15473760

Change-Id: I2168fdd669b5ea1b73fce690609be8293fd9069a
2021-08-06 15:45:38 +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
Paul Duffin
187697f9a3 Merge "Extract a subset of the monolithic flags for comparison" am: 47c456228c am: ff525d012b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788090

Change-Id: Ibf3da5aea82d252cdb32f2711cc807f6ec97d3a9
2021-08-06 09:30:01 +00:00
Paul Duffin
f971586ea9 Merge "Clarify symbols used in verify_overlaps.py" am: 335f02ad21 am: 1e937301f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788089

Change-Id: Ic0b8cb14e36f2d7a1fc35a3a1bf9a5f3f2b32146
2021-08-06 09:29:56 +00:00
Paul Duffin
7d3678319a Merge "Add tests for verify_overlaps script" am: a26cf315a8 am: e55ee8c5f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788088

Change-Id: Id87d21960ae11d227295a7a0f1a6184e389dcd27
2021-08-06 09:29:48 +00:00
Paul Duffin
ff525d012b Merge "Extract a subset of the monolithic flags for comparison" am: 47c456228c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788090

Change-Id: I21426be644f76009449b39d270e9c7ed45ea41eb
2021-08-06 09:18:04 +00:00
Paul Duffin
1e937301f3 Merge "Clarify symbols used in verify_overlaps.py" am: 335f02ad21
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788089

Change-Id: I7d4d02c710024097b44f8238a04244cef900491d
2021-08-06 09:17:58 +00:00