Commit graph

5116 commits

Author SHA1 Message Date
Matthias Männich
199584223a Merge "Revert "refactor of api_levels map for soong injection"" 2023-02-24 09:48:05 +00:00
Treehugger Robot
50ffead8fe Merge "Add information about what module produced a certain androidmk entry" 2023-02-24 04:39:39 +00:00
Cole Faust
39aabe94b9 Add information about what module produced a certain androidmk entry
For easier debugging.

Bug: 254205429
Test: Presubmits
Change-Id: I54fc53dd3b4f32eb3e4458386aa6caa5b76dbb5b
2023-02-23 16:57:43 -08:00
Alix Espino
8393a0fcdc Merge "temporary unblock for builds using sdkSystem" 2023-02-23 20:47:37 +00:00
Matthias Männich
a865f4e905 Revert "refactor of api_levels map for soong injection"
Revert submission 2441746-api_levels_refactor

Reason for revert: broke Android kernel build tools build: https://ci.android.com/builds/branches/aosp_kernel-build-tools/grid?

Reverted changes: /q/submissionid:2441746-api_levels_refactor

Change-Id: I35206879b93ec95ae325025cb764c6c34880dccf
2023-02-23 17:10:27 +00:00
Alix Espino
d3ffe6475e Merge "refactor of api_levels map for soong injection" 2023-02-23 16:35:35 +00:00
Yu Liu
bfb2362cde Only apply apex transition to DCLA libs for now.
Bug: 270339610
Test: mixed_droid.sh
Change-Id: I6a8b7fdefeb504a25256e92647de9b487d5b65a3
2023-02-22 10:43:46 -08:00
Treehugger Robot
14584beec6 Merge "Allowlist frameworks/hardware/interfaces/stats/aidl" 2023-02-22 04:10:01 +00:00
Vinh Tran
9b09bc5e3a Allowlist frameworks/hardware/interfaces/stats/aidl
This fixes current breakage on aosp-master-bazel on bp2build-incremental. aosp/2401793 addes android.frameworks.stats-V2-ndk to libtestvendoratoms but android.frameworks.stats aidl_interface is not allowlisted yet.

However, `//frameworks/proto_logging/stats/stats_log_api_gen:libtestvendoratoms` is still not building because of another issue in genrule + proto.

```
ERROR: out/soong/workspace/frameworks/proto_logging/stats/stats_log_api_gen/BUILD.bazel:87:8: Executing genrule //frameworks/proto_logging/stats/stats_log_api_gen:test_vendor_atoms.cpp failed: (Segmentation fault): bash failed: error executing command (from target //frameworks/proto_logging/stats/stats_log_api_gen:test_vendor_atoms.cpp) /bin/bash -c ... (remaining 1 argument skipped)i
```

The fix to this is similar to aosp/2401794 and is fixed in aosp/2449265

Test: presubmit
Bug: 270131691
Change-Id: I8bcc336d843ee4f0de44f377c828a9a4c959b0ec
2023-02-21 16:24:00 -05:00
Alix
c566ad8a4f refactor of api_levels map for soong injection
Change-Id: I58449fc84617e46727f23ab3d8dd5f118d2ee0d2
Bug: 249265719
Test: go test ./bp2build and locally ran bazel tests
2023-02-21 18:55:37 +00:00
Yu Liu
e43124023c Support DCLA
Bug: 240424572
Test: Manual tests:
1. m --dev-mode-staging com.android.adbd com.android.media.swcodec.
2. verify the DCLA libs from the two apexes have the same size and
   sha1sum, and also match the libs in bazel-out.
3. empty the DCLA libs list in allowlist.go and repeat step 1
4. repeat step 2 and verify the opposite result
5. build git_master: mainline_modules_bundles-userdebug in ABTD
   with the cl, then follow go/build-sideload-dcla-locally to
   download the adbd and swcodec aab files, run the DCLA trimming
   workflow locally, and verify the symlinks in the two trimmed
   apexes are identical and also match the lib path in the DCLA
   apex that was created by the workflow.

Change-Id: Ib2f8a29126a54829c0e10eba17b256a79930fd70
2023-02-21 10:12:47 -08:00
Liz Kammer
d3c240fbd8 Merge changes Iab00c839,I5962b27f
* changes:
  Handle aquery build statements in a goroutine
  Use aquery proto directly
2023-02-21 18:02:42 +00:00
Alix
79f853d7b9 temporary unblock for builds using sdkSystem
Bug: 215230098
Change-Id: I521342c676f3362d3e1db0aab7924a04602525e1
Test:  built captiveportal-lib and inspected BUILD file
2023-02-21 17:01:16 +00:00
Jiyong Park
ce2436302a Fix symlinks from APEX to partitions
Previously, the symlink optimization for APEXes assumed that the target
of the symlinks are in the system partition. The assumption however
doesn't hold always because the file that was added to the APEX might be
with system_ext_specific: true or vendor: true.

Bug: 265598720
Test: m nothing
Change-Id: Ieb9a6769320c0ec697a88c0cae977e7d65288362
2023-02-17 18:22:25 +09:00
Treehugger Robot
ec8f7543f6 Merge "Add com.android.adbd and adbd_test to AOSP prod allowlist." 2023-02-16 12:23:52 +00:00
Jingwen Chen
98bf5cca87 Add com.android.adbd and adbd_test to AOSP prod allowlist.
Test: presubmits
Bug: 260617515
Fixes: 260617515
Change-Id: Iadfd5ec2793d98d90c4be6a30ff706735327c299
2023-02-16 07:58:10 +00:00
Treehugger Robot
9fca81a6ec Merge "Add Always_use_prebuilt_sdks into variableProperties" 2023-02-16 01:03:42 +00:00
Romain Jobredeaux
477733404d Allowlist metalava and dependencies.
Change-Id: Ief72b982b11db20b82bb4678f0cf87550b9fd9e4
2023-02-15 11:32:39 -05:00
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
Zi Wang
c451830446 Merge "Add limited bp2build converter of java_sdk_library" 2023-02-15 02:32:48 +00:00
Treehugger Robot
7ec899ac67 Merge "Fix typo" 2023-02-14 23:51:13 +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
Treehugger Robot
80936bd15f Merge "Collect more metrics for aquery handling" 2023-02-14 19:25:53 +00:00
Romain Jobredeaux
9d16531909 Merge "Allowlist MusicKotlin, jsr305. No manual BUILD for jsr305 and QuickSearchBox." 2023-02-14 19:07:30 +00: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
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
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
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
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
Kevin Dagostino
7d4e3be8e6 Merge "Removing libutils_test which depends on libunwindstack." 2023-02-09 20:20:50 +00:00
Sorin Basca
f96b899f59 Merge "Reland "Target Java 17"" 2023-02-09 14:12:14 +00:00
Jeongik Cha
f08e59c0d7 Add Always_use_prebuilt_sdks into variableProperties
Unbundled build needs switch mechanism between prebuilt and source.
So add Always_use_prebuilt_sdks because Unbundled_build doesn't gurantee
prebuilts is used.

Bug: 264498267
Bug: 246897249
Test: build
Change-Id: I069d4d9e804b4cf96ae70855c7eee3a6c940c9dc
2023-02-09 10:47:59 +09:00
Treehugger Robot
60b3fed203 Merge "Remove unnecessary pass in validatePath." 2023-02-08 20:29:35 +00:00
Sam Delmerico
e413f4046f Merge "mixed build targets need transitive tidy files" 2023-02-08 20:11:30 +00:00
Treehugger Robot
667200e25b Merge "Call hook in java_sdk_library after droidstubs generation" 2023-02-07 21:59:20 +00:00
Sam Delmerico
4ed95e263f mixed build targets need transitive tidy files
Previously in mixed builds, only the tidy files for the boundary module
were built, whereas all of its transitive dependencies' tidy files were
not being built. Instead we should export the list of transitive tidy
files for a module so that we can run clang-tidy for the boundary module
as well as its dependencies.

Bug: 195029134
Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I463646d2ae1fc4aa075a54c264e1c34571c3fd5c
2023-02-07 16:50:30 -05:00
Sam Delmerico
db23e22835 Merge "export allowlist of environment variables to Bazel" 2023-02-07 19:25:39 +00:00
Jihoon Kang
d48abd566b Call hook in java_sdk_library after droidstubs generation
Currently, droidstubs module create java_api_contribution module, but
when a java_sdk_library module dynamically creates a droidstubs module,
java_api_contribution is not created as the hook inside droidstubs get
lost. Therefore, call hook inside sdk_library after creating the
droidstubs module.

Test: m
Change-Id: I68bf1d796f6f9a6f81011ae35e4991b6ed1421ea
2023-02-07 18:45:38 +00:00
Jingwen Chen
24d0c56350 Remove unnecessary pass in validatePath.
Perform a single pass over pathComponents in both validatePath and
validateSafePath instead.

Test: presubmits
Change-Id: I1499183e345ca180900c54a18f9dc8bd534f2588
2023-02-07 09:29:36 +00:00
Kevin Dagostino
2c3be41226 Removing libutils_test which depends on libunwindstack.
Test: b test //system/...
Change-Id: Iceeaa5302931bb45aae4077677ceeee2f86d27a0
2023-02-07 04:11:29 +00:00
Christopher Parsons
a9242e32d5 Merge "Only write soong_injection files if changed" 2023-02-06 22:23:54 +00:00