Commit graph

62839 commits

Author SHA1 Message Date
Jon Bottarini
a0b44cbd1c spelling/grammar fix
Test: Presubmit
Change-Id: I4522ec1c457c7d98adc2820faa457b2bb7cb517a
Merged-In: I4522ec1c457c7d98adc2820faa457b2bb7cb517a
2023-02-21 13:52:21 -08: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
Yu Liu
10174ff208 bp2build of libraries with stubs should handle non-implementation deps
Bug: 266724299
Test: Unit test and manual tests
Change-Id: I7d7641676fbf3d3fae413b27d329a4b05b1cd3bf
2023-02-21 12:07:07 -08: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
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
676630b884 Merge "Express no{,_lib}crt via features vs attrs" 2023-02-21 17:28:17 +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
Victor Chang
789e532a04 Merge "Allowlist java.lang.constant in libcore" 2023-02-21 14:59:34 +00:00
Yiming Jing
dd2c76e772 Add an Override_apex_available property for APEX
This property allows an APEX bundle to ignore the apex_available rules
defined in its dependencies, effectively allowing it to use any APEX
as its dependency.

Bug: 269660351
Test: m
Change-Id: Ib2797e04438ad908ac10b256dce07a7819e836b3
2023-02-20 20:04:14 -08:00
Treehugger Robot
4196e13a6a Merge "Fix symlinks from APEX to partitions" 2023-02-21 03:37:48 +00:00
Victor Chang
7c05d2d185 Allowlist java.lang.constant in libcore
Bug: 270028670
Test: m droid
Change-Id: I7612998fd518442defd5f9f00115e6a16e261b18
2023-02-20 17:27:18 +00:00
Nathan Egge
c2e385cc4c Merge "Add JAVAC to the list of env variables to unset." 2023-02-18 01:40:21 +00:00
Cole Faust
29e7c6fc15 Merge "Disable RBE in multiproduct_kati" 2023-02-17 22:56:21 +00:00
Cole Faust
81f170f6bc Disable RBE in multiproduct_kati
RBE has signifigant performance overhead during
analysis time, in theory to reduce execution time.
But multiproduct_kati only tests analysis, and does
not run any execution, so RBE is just slowing us
down.

Bug: 229863781
Bug: 265603584
Test: time ./build/soong/build_test.bash  --products aosp_arm64 on stage_aosp_master
Change-Id: Icbb2f001fee03a75bad37c14d08a203be20ac6cf
2023-02-17 11:36:35 -08:00
Alex Márquez Pérez Muñíz Díaz Puras Thaureaux
01ec55ec92 Express no{,_lib}crt via features vs attrs
Given that we can map them directly to disabling the
corresponding Bazel features: `-{link_,use_lib}crt`

Test: Existing (adapted) Unit Tests
Test: bp2build.sh
Change-Id: Ib502f6fb929ace8e86a1001e3cc21f399317500c
2023-02-17 19:24:42 +00:00
Nathan Egge
7b067fb753 Add JAVAC to the list of env variables to unset.
Some linux environments export JAVAC for legacy compatibility and this
 variable must be unset to ensure Soong and Make JAVAC values match.

Test: manual

Change-Id: Iae19fcb91b0a7651cbe00fe50f6daed54b4d7879
2023-02-17 18:07:04 +00:00
Andrea Zilio
92ac65952d Merge "Revert "Enable -Wformat-insufficient-args globally"" 2023-02-17 12:54:59 +00:00
Andrea Zilio
cc1d984d49 Revert "Enable -Wformat-insufficient-args globally"
This reverts commit af8b950357.

Reason for revert: Broke the build, see b/269687118

Change-Id: I6f7fac0e24c710bd00af77e4d96c845eefe0a9ce
2023-02-17 11:51:10 +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
Cole Faust
d75b47add9 Merge "Add status messages for RBE and product config" 2023-02-17 07:55:40 +00:00
Cole Faust
64955b32bf Add status messages for RBE and product config
RBE adds a lot of time to m nothing builds,
so add status messages for it so that it's not misattributed
to some other part of the build.

Bug: 269644490
Test: m nothing
Change-Id: Ifff11bfc88f43b559526f3e3d3022c1388e42156
2023-02-16 21:06:19 +00:00
zijunzhao
af8b950357 Enable -Wformat-insufficient-args globally
Bug: b/191699019
Test: m
Change-Id: I6349308d1f8b13e5c5d75b154e8c9b53d9eec4bf
2023-02-16 17:52:22 +00:00
Treehugger Robot
c004bf3b7e Merge changes I55a5a295,I9c09451d,I05177388
* changes:
  Use the profiles in the APEX to dexpreopt system server jars.
  Add tests for the ignored "profile_guided: true" property.
  Output dex_preopt to SDK snapshot.
2023-02-16 14:46:19 +00:00
Treehugger Robot
ec8f7543f6 Merge "Add com.android.adbd and adbd_test to AOSP prod allowlist." 2023-02-16 12:23:52 +00:00
Yi Kong
32a15c4269 Merge "Remove bug links for noOverrideExternalGlobalCflags" 2023-02-16 11:46:16 +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
Yi Kong
d80f6eebc9 Remove bug links for noOverrideExternalGlobalCflags
We are not going to fix these warnings for 3p projects, there is no
point keeping a bug link here.

Test: N/A
Change-Id: I1c2479d8919b1c1b10287e021827b78c52813585
2023-02-16 16:51:31 +09:00
Yi Kong
3e439f42e9 Merge "Revert "Make llvm-strip depend on both lib and lib64"" 2023-02-16 07:32:29 +00:00
Yi Kong
960f535d02 Revert "Make llvm-strip depend on both lib and lib64"
This reverts commit d1fb75df9a.

We have moved to lib directory only, this is no longer necessary. Updated the llvmLib to the proper directory.

Bug: 269398998
Change-Id: I9b1d529da0578a47c21e8b7eba3b458cb2801dce
2023-02-16 06:45:46 +00:00
Treehugger Robot
9fca81a6ec Merge "Add Always_use_prebuilt_sdks into variableProperties" 2023-02-16 01:03:42 +00:00
Jiakai Zhang
81e468171f Use the profiles in the APEX to dexpreopt system server jars.
After this change, if "profile_guided: true" is set, profile-guided
compilation will be enabled for the jar and the ".prof" file next to
the jar in the APEX ("javalib/<name>.jar.prof") will be used as the
profile when dexpreopting for the prebuilt APEX.

Bug: 241823638
Test: m nothing
Test: -
  1. (on internal master) Patch aosp/2426453.
  2. Build the APEX bundle and the module SDK of com.android.wifi
  3. (on tm-dev) Patch this CL and aosp/2141972.
  4. Copy the APEX bundle and the module SDK built on step 2 to the
     source tree
  5. Disable hiddenapi check
  6. lunch cf_x86_64_phone-userdebug && m MODULE_BUILD_FROM_SOURCE=false com.google.android.wifi
  7. cat out/soong/.intermediates/prebuilts/module_sdk/Wifi/current/prebuilt_service-wifi/android_common_com.android.wifi/dexpreopt/oat/x86_64/javalib.invocation
  8. See the profile being used.
Change-Id: I55a5a295e9c5d6f0564afb139c5fb7da91ab8cae
2023-02-15 22:47:24 +00:00
Jiakai Zhang
1f4542c85b Add tests for the ignored "profile_guided: true" property.
This is tricky and is worth some tests.

Bug: 241823638
Test: m nothing
Change-Id: I9c09451d075dca7563eb42c63812375cfd974fbf
2023-02-15 22:47:24 +00:00
Jiakai Zhang
9c4dc19f4e Output dex_preopt to SDK snapshot.
This is needed to determine whether we need to deapex the profile or
not.

Bug: 241823638
Test: m nothing
Test: -
  1. Patch ag/20582608 PS2.
  2. TARGET_BUILD_APPS=com.android.wifi packages/modules/common/build/mainline_modules_sdks.sh
  3. See the `dex_preopt` property being written.
Change-Id: I05177388c24be1ab315247ea85e7e3a8600cebd3
2023-02-15 22:47:23 +00:00
Romain Jobredeaux
47c71e840b Merge "Allowlist metalava and dependencies." 2023-02-15 21:00:27 +00:00
Jihoon Kang
61e09756c2 Merge "Add static_libs property in java_api_library soong module" 2023-02-15 17:48:00 +00:00
Aditya Kumar
6e3d46d8aa Merge "Revert "Build riscv64 with thin LTO"" 2023-02-15 17:02:27 +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
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