Commit graph

38198 commits

Author SHA1 Message Date
Lukacs T. Berki
cef87b62e4 Make multiproduct_kati call soong_ui.bash .
This serves to not link parts of soong_ui (and eventually soong_build)
into a separate, weird binary. This is in turn good because they contain
any number of global variables and no one really thought about what
happens when two instances are executing at the same time in the same
address space.

This comes with a slight performance hit: 5 aosp_* projects build 152
seconds instead of 146. I suppose this is a price worth paying for a
clean design?

Test: presubmits.
Change-Id: I5623dcab2290f0fc392dd2ede597b9794a3d2a4e
2021-08-10 17:35:14 +02: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
baeca672c1 Merge "Switch to clang r428724 13.0.1." 2021-08-08 18:20:22 +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
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
fe3bab726d Merge "Revert "Make DWARF v5 the default debug information format."" 2021-08-06 17:04:41 +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
47c456228c Merge "Extract a subset of the monolithic flags for comparison" 2021-08-06 09:08:29 +00:00
Paul Duffin
335f02ad21 Merge "Clarify symbols used in verify_overlaps.py" 2021-08-06 09:06:23 +00:00
Paul Duffin
a26cf315a8 Merge "Add tests for verify_overlaps script" 2021-08-06 09:05:45 +00: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
Stephen Hines
bb1a17aecb Revert "Make DWARF v5 the default debug information format."
This reverts commit 5e13f86fc8.

libabigail isn't quite ready for DWARF v5 yet, so let's revert this
temporarily.

Bug: http://b/182004844
Bug: http://b/195152239
Bug: http://b/195698910
Test: Builds
Change-Id: I4b1dd8f9e64d19f37c90b8a2433cbb302c7d5105
2021-08-05 17:05:01 -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
11ec0a8f8b Add more debugging to run_with_timeout
Print more messages in run_with_timeout to make it easier to
determine which log statements came before the timeout and the
on_timeout command.

Test: run_with_timeout_test.go
Change-Id: I92ad663529fa03d91185ba382654a73f0eba1ab7
2021-08-05 16:51:50 -07: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
Paul Duffin
53a7607f7d Extract a subset of the monolithic flags for comparison
Previously, the compare_signature_flags compared the full set of
monolithic flags against the modular flags and just ignored any
monolithic flags for a signature that was not present in the modular
flags. It essentially performed two tasks, identifying the subset of
the monolithic flags against which the modular flags should be compared
and then doing the actual comparison.

This change separates those two tasks, by first creating a dict that is
the subset of the monolithic flags against which the modular flags will
be compared and then do the comparison.

At the moment the subset is simply the set of monolithic flags
associated with the signatures that are present in the modular flags.
Follow up changes will provide other ways to select the subset.

Bug: 194063708
Test: atest --host verify_overlaps_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: Icb547f071b814dd955f31255b0d35597f7ba4aa1
2021-08-05 14:19:57 +01:00
Paul Duffin
7be96337f2 Clarify symbols used in verify_overlaps.py
Switches symbols to use monolithic... and modular... to try and clarify
the purpose of those symbols.

Bug: 194063708
Test: atest --host verify_overlaps_test
Change-Id: Ifc646edebe3d43b51dc3528fa883718399cb5254
2021-08-05 14:19:57 +01:00
Paul Duffin
428c65156b Add tests for verify_overlaps script
Refactor verify_overlaps to make it testable and add tests for the
comparison. It does make one significant change in behavior which is to
read each of the files produced by a bootclasspath_fragment into a dict
before comparison, rather than reading and comparing them a row at a
time. That allows it to reuse the code to read a CSV into a dict.

Bug: 194063708
Test: atest --host verify_overlaps_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: Ib70ac87fe089fc25e3bef18f367d4939bfc0cb8d
2021-08-05 14:16:51 +01: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
27ac52198d Merge "Update the Rust prebuilt version number to 1.54.0" 2021-08-04 21:28:20 +00:00
Treehugger Robot
1e28e36589 Merge "[rust] [coverage] Don't pass -C link-dead-code" 2021-08-04 20:51:47 +00:00
Mathew Inwood
bf49705608 Merge "Update error message for new policy." 2021-08-04 09:59:33 +00:00
Pirama Arumuga Nainar
b13e8ac6c8 [rust] [coverage] Don't pass -C link-dead-code
Bug: http://b/186873963

Per jgalenson@, this was added for GCOV and is not needed for clang
coverage.

Test: http://go/abtd/run/L71000000950546158
Change-Id: I352669687cbe764d938acb94d9d4fe0c24a31a56
2021-08-04 05:06:22 +00:00
Treehugger Robot
03beb0ec77 Merge changes Ie2012adb,Ib0283ca6
* changes:
  static rust binaries are also prohibited in APEXes
  Revert "Revert "Prohibit static executable in APEX""
2021-08-04 04:35:20 +00:00
Treehugger Robot
8662a3793b Merge "Update documentation for genrule and sdk_library" 2021-08-04 00:14:31 +00:00
Alexander Smundak
408a4bece5 Merge "Improve dynamic inherit paths handling" 2021-08-03 20:14:39 +00:00
Christian Wailes
99bc67a548 Merge "Conditionally apply rustdoc flags to third party crates" 2021-08-03 19:39:17 +00:00
Sasha Smundak
90be8c5589 Improve dynamic inherit paths handling
Allow up to 150 inherited paths matching the pattern.
When seeing `include $(BOARD_CONFIG_VENDOR_PATH)/BoardConfigVendor.mk`,
search only vendor/google_devices

Bug: 193566316
Test: internal
Change-Id: Ic88cb116075512f87d5a5f7a7f32dabd09ff640c
2021-08-03 11:06:54 -07:00
Sasha Smundak
3deb968aef Translate copy-files, add_soong_config_namespace and add_soong_config_var_value macros
Bug: 194521362
Test: internal

Change-Id: I88fb62f057476d96dfb056813a900e8497e7bbb9
2021-08-03 11:06:54 -07:00
Romain Jobredeaux
596a78949c Merge "Add prebuilts/r8 to the bp2build BUILD file overwriting exception list." 2021-08-03 16:07:16 +00:00
Liz Kammer
0f77bb4304 Merge "Correct isThirdParty check" 2021-08-03 14:54:12 +00:00
Joel Galenson
48a7fb6afa Merge "Add librustutils to the Rust allowlist and remove libc." 2021-08-03 14:20:06 +00:00
Mathew Inwood
768a01160a Update error message for new policy.
A new presubmit hook enforces that required information is present in
any CL that adds new dependencies to allowed_deps.txt.

Test: m
Bug: 195303213
Change-Id: I1fb932a52f64f9cbf0d12ead75ffd3d9c2a5e942
2021-08-03 14:40:46 +01:00
Ivan Lozano
2bba729971 Merge "rust: Disable dead stripping for fuzzers." 2021-08-03 12:54:12 +00:00
Jiyong Park
d12979d09a static rust binaries are also prohibited in APEXes
Also fixes a bug that the test runs for host APEXes like
com.android.art.host.

Bug: 185971244
Test: m
Test: build mainline_modules target on aosp-master
Change-Id: Ie2012adbf2f4eda5454d5eaa30f128fb1e20ad37
2021-08-03 07:52:46 +00:00
Jiyong Park
192600a7d0 Revert "Revert "Prohibit static executable in APEX""
This reverts commit 2125aab504.

Reason for revert: relanding along with a forward fix

Change-Id: Ib0283ca6beefa2f3073860287d00553ad0af6317
2021-08-03 07:52:17 +00:00
Jiyong Park
2fe71a5165 Merge "Revert "Prohibit static executable in APEX"" 2021-08-03 07:50:26 +00:00
Yen-Chao Chen
2125aab504 Revert "Prohibit static executable in APEX"
This reverts commit 3a8130c797.

Reason for revert: Build failed.

Change-Id: I28c72c8c3adaeb23bff9bffe3994971aa3f2e4f4
2021-08-03 04:51:12 +00:00
Jiyong Park
d8a3513155 Merge "Prohibit static executable in APEX" 2021-08-03 03:48:01 +00:00
Sasha Smundak
16e0773e7f Translate more Make builtin functions
Adds support for abspath/firstword/dir/lastword/notdir functions

Bug: 194521362
Test: internal
Change-Id: I34dd6a81f21a4ef2f8f0a72bd80284ced8957b5c
2021-08-02 15:13:59 -07:00
Sasha Smundak
6609ba7664 Allow dynamically calculated inherit-product path
Bug: 193566316
Test: internal
Change-Id: Iaa7b68cf459f9a694ae9d37a32c9372cf8a8335a
2021-08-02 14:35:45 -07:00
Treehugger Robot
e083a05ad0 Merge changes I43e61218,Iea36ecaa
* changes:
  Add an option to gather CPU profile.
  Allow $(filter ...) with arbitrary args if its result is compared to the empty string
2021-08-02 20:18:17 +00:00
Chris Wailes
b2703adce4 Conditionally apply rustdoc flags to third party crates
This CL changes the logic in rust/builder.go so that some rustdoc flags
are only applied to external crates.  This will allow us to since
warnings and deal with soft-failures in external crates while allowing
us to be more strict with our internal Rust code.

Bug: 195136952
Test: m rustdoc
Change-Id: Icdde304bbbb323cae9657e8f842f58ae79e811ce
2021-08-02 11:50:34 -07:00
Liz Kammer
067b889762 Correct isThirdParty check
Previously, isThirdParty check was over-selecting for third-party-ness,
the only non-third-party paths were those explicitly excluded from
typically third party directories, results in ~all code being considered
third party.

Updated test to ensure bionic is not considered third party, which fails
without this change.

Test: go soong tests
Change-Id: Id371aaad2ceef2b3163384fa84712397877cbe90
2021-08-02 11:50:34 -07:00
Romain Jobredeaux
8c98c25f07 Add prebuilts/r8 to the bp2build BUILD file overwriting exception list.
Change-Id: I241d5e9a1bf1269a033d1f7c58e851610105c7fa
Test: b build prebuilts/r8:r8_jar_import
Bug: 194103854
2021-08-02 17:53:24 +00:00