Commit graph

62953 commits

Author SHA1 Message Date
Liz Kammer
a4655a96c0 Handle aquery build statements in a goroutine
Creation of build statements is largely parallelizable because each
action is independent apart from updates/reads to
depsetHashToArtifactPathsCache. Locally resulted in build statements
taking ~.45 seconds on staging mode to ~.02 seconds

Test: CI
Change-Id: Iab00c8394a9eab17353f71230885ff0870e17f24
2023-02-15 11:29:49 -05:00
Liz Kammer
00629db646 Use aquery proto directly
This prevents unnecessary copies of data from the query by using a
pointer to the proto or its contents

Test: go test soong tests
Test: m nothing
Change-Id: I5962b27fe31f7103d2af6cef159f11747cff3ed9
2023-02-15 11:29:47 -05:00
Cole Faust
7ae8afc115 Merge "Convert RuleBuilder to static rule in buildRuleToGenerateIndex" 2023-02-15 07:27:31 +00:00
Treehugger Robot
9406fc207a Merge "Silence rustdoc warnings from 3rd party Crates" 2023-02-15 03:26:34 +00:00
Zi Wang
c451830446 Merge "Add limited bp2build converter of java_sdk_library" 2023-02-15 02:32:48 +00:00
Cole Faust
a5f64f0396 Convert RuleBuilder to static rule in buildRuleToGenerateIndex
This saves ~34kb from the build.ninja file.

Test: Presubmits
Change-Id: I8fa4974e4f1509be7938c774e536d15a63534753
2023-02-14 17:50:31 -08:00
Aditya Kumar
4c660ae58e Revert "Build riscv64 with thin LTO"
This reverts commit 17c9c2a5b5.

Reason for revert: Wait until new toolchain with linker fix las landed (https://android-review.git.corp.google.com/c/toolchain/llvm_android/+/2424081)

Change-Id: I05b14c12ac93182dd93c5b490f260071c6d3a090
2023-02-15 01:32:22 +00:00
Jihoon Kang
e30fff0b5c Add static_libs property in java_api_library soong module
Package private stub annotations are not part of any API surfaces, but
are included in the `android_<API_SURFACE_NAME>_stubs_current`. Since
these cannot be included in the java_api_library by api_contributions,
add static_libs property to statically include jars in the output jar
file.

Test: m
Change-Id: Icb4401f29079ba32df4c192943a7e8814599d9ba
2023-02-15 00:27:18 +00:00
Chris Wailes
7b3eb24e29 Silence rustdoc warnings from 3rd party Crates
Test: m rustdoc
Change-Id: I25599845b2bec76d92fd325b62132aeac9dd74c4
2023-02-14 16:09:49 -08:00
Treehugger Robot
7ec899ac67 Merge "Fix typo" 2023-02-14 23:51:13 +00:00
Yike Zhang
bbfe9480be Merge "Set test config of Robolectric tests to LOCAL_FULL_TEST_CONFIG" 2023-02-14 23:30:39 +00:00
Julien Desprez
4d3f11ccb3 Merge "Revert "Reland "Target Java 17""" 2023-02-14 22:21:26 +00:00
Zi Wang
b2179e397a Add limited bp2build converter of java_sdk_library
Only public, system, test, module_lib and system_server are
converted in order to generate api_fingerprint.txt in Bazel.

Test: java_sdk_library_conversion_test.go and TH

Bug: 266973526
Change-Id: I67a00806165e5afad3876b6cd5cdbc6b0dd65d8b
2023-02-14 13:21:21 -08:00
Julien Desprez
91ba6c7e01 Revert "Reland "Target Java 17""
This reverts commit 1fbf7f21a4.

Reason for revert: broke docker image, pinning is incomplete it seems

Change-Id: I7102cb233a4fe5ce0f5a1ead98cfc661c3d82ce5
2023-02-14 20:26:31 +00:00
Ivan Lozano
766836656f Merge "rust: Fix coverage in no-std crates" 2023-02-14 20:12:10 +00:00
Liz Kammer
2c3122e90a Merge "Only create a command line replacer once" 2023-02-14 19:26:25 +00:00
Treehugger Robot
80936bd15f Merge "Collect more metrics for aquery handling" 2023-02-14 19:25:53 +00:00
Yike
0fcf90a357 Set test config of Robolectric tests to LOCAL_FULL_TEST_CONFIG
Downstream infra needs this information to determine if a module is
testable to TradeFed.

Test: m out/target/product/coral/module-info.json
Bug: 268670243
Change-Id: Ibdf99c86cb6abe726552a6e4ffbdc756f751907b
2023-02-15 03:18:55 +08:00
Romain Jobredeaux
9d16531909 Merge "Allowlist MusicKotlin, jsr305. No manual BUILD for jsr305 and QuickSearchBox." 2023-02-14 19:07:30 +00:00
Trevor Radcliffe
0620c7c56a Merge "Add test that LTO isn't propagated to runtime_libs" 2023-02-14 17:09:03 +00:00
Usta (Tsering) Shrestha
23da27c321 Merge "fix flakey test" 2023-02-14 16:37:04 +00:00
Liz Kammer
f15a0797c0 Only create a command line replacer once
Test: CI
Change-Id: Ibb9b822aea808c936fedc4c8fea7b7d787b101d5
2023-02-14 11:10:20 -05:00
Liz Kammer
690fbac200 Collect more metrics for aquery handling
Test: go test soong tests
Test: m nothing & verify metrics
Change-Id: Id19e004d90dfbaa1b1706c607d5250bf845c0f3b
2023-02-14 11:10:19 -05:00
Ivan Lozano
9ef9cb8b3f rust: Fix coverage in no-std crates
Coverage builds for no_std crates currently fail because
profiler_builtins are part of libstd and therefore do not get included.

When calculating the dependencies for coverage enabled targets, check if
the stdlib is being included, and if it is not then pull the
profiler_builtins sysroot.

Bug: 249551848
Test: CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS='*' make libtinyvec_nostd.rlib-std
Change-Id: I73f89bddcb2d4d9c704cb3962ee39b73888c7f3f
2023-02-14 11:04:21 -05:00
Treehugger Robot
da92c3ecba Merge "Improve documentation around go/allowed-deps-error" 2023-02-14 15:00:31 +00:00
Jiyong Park
9785915c2d Fix typo
Bug: N/A
Test: m nothing
Change-Id: Ia8b8ba7582ac93643d485cf3340066efdbddcae5
2023-02-14 17:07:41 +09:00
Treehugger Robot
811f5c9471 Merge "Revert "Dynamically assemble the list of python launcher shared libs for precompiling"" 2023-02-14 07:05:50 +00:00
Aditya Kumar
a533904855 Merge "Build riscv64 with thin LTO" 2023-02-14 05:00:24 +00:00
Cole Faust
1d09ec6fca Merge "Add ConvertApexAvailableToTags" 2023-02-14 00:26:52 +00:00
Cole Faust
909d237c84 Revert "Dynamically assemble the list of python launcher shared libs for precompiling"
This reverts commit aa5b377ee9.

Reason for revert: this broke musl builds by removing the install dependency from python binaries to the launcher shared libraries: https://android-build.googleplex.com/builds/submitted/9600042/unit_tests_x86_64_musl/latest/view/logs/build_error.log

Change-Id: I4e13f333f287831ba13724f13ab2be789a92b476
2023-02-13 23:17:40 +00:00
AdityaK
17c9c2a5b5 Build riscv64 with thin LTO
Depends on: https://android-review.git.corp.google.com/c/platform/system/libhwbinder/+/2336346

Bug: b/254713216
Change-Id: Id750cab796ddf8c180fa0570e46cab0161788974
2023-02-13 21:42:30 +00:00
AdityaK
f7c0afdb6e Disable emulated tls for RISCV
Bug: b/267688421

Change-Id: I885bcf966db2e9a0a3edc1fee865b3cf9c6ff90a
2023-02-13 21:31:36 +00:00
Usta (Tsering) Shrestha
9393264eff fix flakey test
since bp2build runs concurrently, errors can occur in any order

Bug: 265845583
Change-Id: Iea6d26bc73112dc89c963545b3e0fc7e1b7fa349
Test: run test localy multiple times
2023-02-13 20:25:12 +00:00
Sam Delmerico
e56fd9467d Merge "pass TIDY_EXTERNAL_VENDOR envvar to Bazel" 2023-02-13 19:02:29 +00:00
Cole Faust
8b0c15b083 Merge "Dynamically assemble the list of python launcher shared libs for precompiling" 2023-02-13 18:25:08 +00:00
Cole Faust
fb11c1ce81 Add ConvertApexAvailableToTags
This is a more flexible version of ApexAvailableTags
that can be used for the aidl modules.

Bug: 260694842
Test: go test
Change-Id: Iddb15e737c19e95977f74e8c627d6044d8875746
2023-02-13 10:23:36 -08:00
Chris Wailes
97ce82e30f Merge "rustc-1.66.1 Build 9591243" 2023-02-13 17:05:12 +00:00
Treehugger Robot
8916b21320 Merge "Write product config files only if changed." 2023-02-11 03:59:01 +00:00
Sam Delmerico
700b4d3e1a pass TIDY_EXTERNAL_VENDOR envvar to Bazel
Bug: 268668248
Test: verify that Bazel tidy actions don't have a large diff from Soong tidy actions:
  (add -v to Ninja invocation in ui/build/ninja.go [and disable fifo file])
  WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m com.android.adbd 2>&1 | tee soong_build-tidy.adbd &&
  WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true m com.android.adbd --bazel-mode-staging 2>&1 | tee mixed_build-tidy.adbd &&
  grep -Po "prebuilts/clang/host/linux-x86/clang-r475365b/bin/clang-tidy.sh \K\S+" soong_build-tidy.adbd | sort -u > soong-clang-tidy.adbd &&
  grep -Po "prebuilts/clang/host/linux-x86/clang-r475365b/bin/clang-tidy.sh \K\S+" mixed_build-tidy.adbd | sort -u > mixed-clang-tidy.adbd &&
  vimdiff soong_build-tidy.adbd mixed_build-tidy.adbd
Change-Id: I22804d6d92ed56d9727eaf430318df0b041712a8
2023-02-10 16:46:33 -05:00
Chris Parsons
0008cf8b24 Write product config files only if changed.
Test: Manually verified artifact timestamps are unchanged on a second
invocation of `m nothing` (with bp changes)
Test: Presubmits

Change-Id: I6bdf106a464597a07ac290cb575425d700721ffe
2023-02-10 16:03:26 -05:00
Chris Parsons
1a12d03230 Avoid rewriting soong_build outputs if unchanged
This changes bp2build codegen, symlink forest generation, and
soong_build so that they do not rewrite output files if the contents are
unchanged.

Bug: 266983462
Test: m droid
Test: canonical_perf.sh benchmarking
Test: Manually verified that rerunning analysis did not regenerate
out/soong/workspace/prebuilts/sdk/BUILD.bazel unless contents changed

Change-Id: I5ec227df7a32b53c7fa0d741fb1403a51931024b
2023-02-10 15:34:06 -05:00
Trevor Radcliffe
cb7c448066 Add test that LTO isn't propagated to runtime_libs
Bug: 261733821
Test: It is a test
Change-Id: I2cda89dc53d6eaa51c756f552d990169a280b053
2023-02-10 20:29:20 +00:00
Chris Wailes
7ebba7ebf9 rustc-1.66.1 Build 9591243
Bug: https://issuetracker.google.com/issues/263153841
Test: m rust
Change-Id: I3927163f7df2bacb2096328d0557acf9c9668b77
2023-02-10 12:24:41 -08:00
Jiakai Zhang
871109e91d Merge "Properly check the deapexed files in tests." 2023-02-10 15:18:37 +00:00
Jiakai Zhang
ebf48bf1e2 Properly check the deapexed files in tests.
The tests in bootclasspath_fragment_test setup the environment to have
two APEXes: a source one and a prebuilt one. Before this change, the
tests for prebuilt incorrectly check the contents in the source one.
This change introduces a new function that properly checks files
deapexed from the prebuilt one.

Bug: 241823638
Test: m nothing
Change-Id: I1865c20b198d50e7ebc8ebfb9f7c71394a225ab7
2023-02-10 23:13:41 +08:00
Jingwen Chen
2d7f6fdfa6 Check that apex#filesInfo is not nil in mixed bazel/soong mode.
filesInfo should not be used for an apex that's converted to Bazel,
since all information should come from the Bazel starlark provider.
filesInfo is populated when there's a full Android.bp module graph of
the apex deps.

Test: presubmits
Change-Id: I4b9c596ca7841f4ea76e21f929039282113b6752
2023-02-10 08:07:41 +00:00
Sorin Basca
4025390468 Allow java.lang.runtime in boot image
Test: m
Change-Id: Icb208bb235f9c6ac97492c54c32a3174982756ae
2023-02-10 07:31:51 +00:00
Sorin Basca
cc9eee0af2 Emit record annotation
Test: m
Change-Id: Ic1aae5c8f9fbf46293dc7e97e2951be3f11f4bbb
2023-02-10 07:30:51 +00:00
Colin Cross
f5d42a206f Merge "Fix test so it works on mac" 2023-02-10 05:00:02 +00:00
Treehugger Robot
e86ef598d5 Merge "Enable -Wnull-dereference globally" 2023-02-09 22:37:21 +00:00