Commit graph

63982 commits

Author SHA1 Message Date
Treehugger Robot
c887ac6a04 Merge "Depend on stubs via @api_surfaces" 2023-03-17 21:06:55 +00:00
Treehugger Robot
9054cfb3d8 Merge "Create a sh_binary target for jars-to-module-info" 2023-03-17 20:50:15 +00:00
Romain Jobredeaux
b1559e9901 Merge "Exclude jdk17 from bp2build instead of jdk11" 2023-03-17 20:43:33 +00:00
Florian Mayer
c0d209f2e5 Merge changes Ib7d0ef98,Ifbd1e542
* changes:
  Re-enable stack frame size errors
  Increase BB to explore for reachability analysis
2023-03-17 18:51:17 +00:00
Alix Espino
2eb2ecfec0 Merge "Create helper function for BazelTargetModuleProperties in java/android" 2023-03-17 17:43:39 +00:00
Cole Faust
bebe607db4 Merge "Export non-apex variants of modules to make" 2023-03-17 17:20:19 +00:00
Spandan Das
2518c022d1 Depend on stubs via @api_surfaces
BUILD files of rdeps should depend on stubs via @api_surfaces
indirection. e.g. instead of depending on
//system/logging/liblog:liblog_stub_libs_current, it should depend on
@api_surfaces//module-libapi/current:liblog. This ensures that the
generated BUILD files are compatible with Multi-tree.

Update the unit tests for this change.

Test: TH
Change-Id: Ibcc36dcfbee7b1973b341485f015e67987564dcc
2023-03-17 16:54:53 +00:00
Romain Jobredeaux
d4e1a1569e Exclude jdk17 from bp2build instead of jdk11
This is part of the changes needed to switch to jdk17 as the default.

Test: presubmits
Bug: 215230098
Change-Id: I4dad9f576c88bdc98f329a35fb8a1eb1527b1366
2023-03-17 11:06:02 -04:00
Romain Jobredeaux
6d8716c176 Create a sh_binary target for jars-to-module-info
This will enable its bp2build conversion, and is needed for java_system_modules support in Bazel

Change-Id: I4f3ff5e36c8cd7f78efbb42f641efb2f76a8b71d
Bug: 215230098
2023-03-17 14:58:08 +00:00
Usta (Tsering) Shrestha
9741785c4c Merge "python aprotoc instead of jq and textproto" 2023-03-17 14:13:18 +00:00
Sam Delmerico
9ac38d7e4e Merge "bp2build allowlist libimapper, bufferpools deps" 2023-03-17 14:07:29 +00:00
Romain Jobredeaux
d3d2be2636 Merge "Create an intermediate java library for every java_binary target" 2023-03-17 12:30:15 +00:00
Jingwen Chen
bb37c196a3 Merge "Populate apexBundle#filesInfo using bazel info." 2023-03-17 06:42:04 +00:00
Wei Li
b67dbb23c5 Merge "Build partition images and SBOM seperately in case the build of SBOM introduces extra dependencies that included in partition images." 2023-03-17 05:24:56 +00:00
Prashanth Swaminathan
bdc99964cf Merge "Enable VNDK when version matches platform VNDK" 2023-03-17 02:46:00 +00:00
Treehugger Robot
f77df19cb8 Merge "minor refactor ui/build/ninja.go" 2023-03-17 02:07:51 +00:00
Treehugger Robot
9433998d9a Merge "Fix the make name of rust snapshots" 2023-03-17 00:13:50 +00:00
Wei Li
898918f7c8 Build partition images and SBOM seperately in case the build of SBOM introduces extra dependencies that included in partition images.
Bug: 272358980
Test: build/soong/tests/sbom_test.sh
Test: CIs
Change-Id: I99bd2357344f9a3d5827cf052b69e3e8545241c0
2023-03-16 22:52:35 +00:00
Alix
3254002a7c Create helper function for BazelTargetModuleProperties in java/android
Prevents inconsistent load locations from being added for java_library,
android_library, kt_jvm_library targets that are generated in multiple
places.

Change-Id: I66ae5af137d7dff3f6fa6660dee539cf9ab22b9e
Test: go test ./bp2build
2023-03-16 21:29:01 +00:00
Usta Shrestha
47541bb1cf python aprotoc instead of jq and textproto
Bug: 273996308
Test: incremental_build.sh -c clean
Change-Id: I5b6c32667003010ccac5d3a46ac888f26788b3c5
2023-03-16 21:28:21 +00:00
Romain Jobredeaux
f5f6073ff5 Create an intermediate java library for every java_binary target
We're already doing this for kotlin libraries as java_binary does not
support kotlin sources.

Change-Id: I4967b3aca21dac8e0eaf54d48cc35d57a4c4923e
2023-03-16 21:11:30 +00:00
Sam Delmerico
9d71a84e55 bp2build allowlist libimapper, bufferpools deps
These are used to build com.android.neuralnetworks and
com.android.media.swcodec.

Bug: 273927900
Test: b build --config=android //frameworks/av/apex:com.android.media.swcodec
Test: b build --config=android
  //packages/modules/NeuralNetworks/apex:com.android.neuralnetworks
Change-Id: Ia36d6e3419fb5034f1dbf410da738fcbf98d6874
2023-03-16 16:55:47 -04:00
Treehugger Robot
65e42ecd47 Merge "Rename mk2rbc/cmd to make go install work properly" 2023-03-16 20:26:22 +00:00
Wei Li
44ac6dad27 Merge "Revert "Revert "Revert "Revert "Add integration test for testing generat...""" 2023-03-16 18:20:48 +00:00
Cole Faust
502da3987a Export non-apex variants of modules to make
Currently, non-apex variants of modules that are in apexes are not
exported to make unless they're apex_available to the platform. This
means that you can't `m` those modules directly.

However, there is a workaround in the apex androidmk implementation that
emits make rules for the removed modules, but just redirects them to
build the apex itself. We want to remove that, but one of the problems
with doing so is that you can no longer `m` many modules afterwards.

To fix that, unhide the apex's dependencies from make. To ensure they're
not installed, call SkipInstall() on them, and update SkipInstall() to
be more strict by setting `LOCAL_UNINSTALLABLE_MODULE := true`.

Bug: 254205429
Test: Presubmits
Change-Id: Ib971981559f3b642ce6be8890679e994e1b44be0
2023-03-16 11:13:23 -07:00
Jingwen Chen
2d37b641c5 Populate apexBundle#filesInfo using bazel info.
This CL adds a few things:

1) Populate the filesInfo struct with cquery'd information from an
apex's ApexMkInfo provider. This filesInfo is then used in
apex/androidmk.go to generate Make modules (soong_cc_rust_prebuilt.mk),
which are then used in packaging to generate zip files of symbols in $PRODUCT_OUT.
2) Make a list of dicts of primitives JSON-encodable.
3) Tests.

Bug: 271423316
Bug: 271423062
Test: presubmits
Change-Id: Iaa34f51044de310510e580d9cf1fe60bbef801c1
2023-03-16 18:09:27 +00:00
Sam Delmerico
c02e7d4017 Merge "remove stub dependency on source_library" 2023-03-16 17:43:11 +00:00
Spandan Das
046bb4b08a Merge "NDK ABI diffs requires implementation" 2023-03-16 17:02:04 +00:00
Jeongik Cha
96d6227999 minor refactor ui/build/ninja.go
1. extract .ninja_log as const
2. log an error during reading .ninja_log

Test: m nothing
Bug: 271527305
Change-Id: I395dd8419620bfa9fad3af23c96e5a22ca44e2fb
2023-03-17 01:53:11 +09:00
Nicolas Geoffray
addd60c430 Merge "Revert^2 "Generate a boot image extension for mainline BCP..." 2023-03-16 16:07:45 +00:00
Treehugger Robot
feeee3ad26 Merge "make tidy attribute tri-state" 2023-03-16 15:42:21 +00:00
Sam Delmerico
5f90649036 remove stub dependency on source_library
Since the source_library attribute of _cc_stub_library_shared was a
label attribute, the source library was added as a dependency of the
stub which doesn't always make sense. E.g. it caused validation actions
for the source library to run even when we weren't building the source
library.

This change converts the label attriubte to a string attribute so that
we don't add the dependency.

Bug: 263390551
Change-Id: I19c62d1e14847dff68ab37156452addaa119eaf9
2023-03-16 10:01:22 -04:00
Jeongik Cha
0cf44d5e8d Add --ninja_weight_source option
It has 3 options for now.
* ninja_log: uses ninja log file for data source
* evenly_distributed: pass empty list for ninja to consider every work as the same
* not_used: do not use critical path logic in ninja

In addition, I added the option in the metrics to track

Bug: 271527305
Test: m --ninja_weight_source=ninja_log|empty|not_used
Change-Id: Ib4c812c20606a34b17d3f0edb71057b477c4f90e
2023-03-16 19:52:27 +09:00
Jeongik Cha
767ce714bb Add time unit for CriticalPathInfo's fields' name
Bug: 271526845
Test: check metrics
Change-Id: Ie7e133033371906b29caad16d0b6bcd238b9f8db
2023-03-16 18:29:55 +09:00
Jiakai Zhang
b879620ca8 Revert^2 "Generate a boot image extension for mainline BCP...
Revert submission 2465993-boot-image-mainline-revert

Reason for revert: Relanding the changes

Reverted changes: /q/submissionid:2465993-boot-image-mainline-revert

Change-Id: Ie611cf3a1ff4be7a7beab164f69b4186c474be5c
2023-03-16 08:46:29 +00:00
Prashanth Swaminathan
0344c024fd Enable VNDK when version matches platform VNDK
When evaluating whether to build the VNDK for the multi-target
configurations, we construct the API level based on the VNDK
version. When the VNDK version is 'current', we replace the
version name with the platform SDK version e.g. 'UpsideDownCake'.

For architectures that currently have a MinApiArch of FutureApiLevel
(i.e. 'current'), comparing 'UpsideDownCake' with 'current' will
assume 'current' is at a higher API level and skip building the
VNDK.

Before perofrming the API level comparison, we check that the VNDK
version does not match the platform VNDK version. If true, it is
necessary to disable the VNDK when it does not meet the minimum API
level for the architecture. If false, we skip this check and allow
the VNDK to be enabled, as this implies we are targeting the 'current'
VNDK version and should include the target platform VNDK.

Test: m (soong test) & boot
Change-Id: Iacc33d2858fef670ddfdff5bbde9d32b084979c9
2023-03-15 23:28:45 -07:00
Dan Willemsen
aa2b7cc21d Rename mk2rbc/cmd to make go install work properly
The standard go tooling assumes that a package's binary name should be
the name of the containing folder. Before this change, `go install` or
`go build` (without `-o`) names this binary `cmd`.

Test: treehugger
Change-Id: I45a4e97f4a0d59744d644e30636250ceefe3bd1c
2023-03-15 22:51:01 -04:00
Treehugger Robot
da4a78bf40 Merge "Add --multitree-build flag" 2023-03-16 02:34:22 +00:00
Justin Yun
24b246a7a8 Fix the make name of rust snapshots
Rust snapshot must have proper suffix for androidmk to avoid conflict
with the existing modules.

Bug: 230780263
Bug: 235895567
Test: m nothing
Change-Id: I35794196553621cd722c067d7965b2a61aa351bd
2023-03-16 11:05:41 +09:00
Treehugger Robot
eabe937355 Merge "Add external/escapevelocity to allowlist" 2023-03-15 23:48:26 +00:00
LaMont Jones
52a7243387 Add --multitree-build flag
Add a flag that enables logic specific to multitree-build builds.

Bug: b/266730267
Test: treehugger, manual
Change-Id: Ia6f392525faa9d66bb6e0692b2a2e9c3b8493b0d
2023-03-15 23:08:34 +00:00
Kevin Dagostino
24de5f2485 Merge "Cache GoogleProdCredsExist() to save ~800ms during builds." 2023-03-15 21:44:26 +00:00
Usta Shrestha
d66f2ce93d Add external/escapevelocity to allowlist
Test: build/bazel/ci/bp2build.sh
Bug: 273739117
Change-Id: Iee11cc6029d1bce5a426a4467dd661630c8c3e9a
2023-03-15 15:04:59 -04:00
Wei Li
73032c8fa3 Revert "Revert "Revert "Revert "Add integration test for testing generat...""
This reverts commit 1e75eccb18.

Reason for revert: The SBOM generation change has been submitted in aosp/2485540, so its integration test in this change should be ok to submit now.

Change-Id: Idb8c84a871b2a5633bed998eb7483fc91d30e97a
2023-03-15 18:31:38 +00:00
Sam Delmerico
63f0c93b09 make tidy attribute tri-state
Bazel boolean attributes can only support true or false states, but the
clang-tidy logic changes for modules which don't set a specific value.
Therefore, the tidy attribute should really be a tri-state of "true",
"false", or "" (unset).

Test: b test //build/bazel/rules/...
Bug: 268681923
Change-Id: I85fbaa612d175f475757db806cea6c018901fe3e
2023-03-15 10:10:43 -04:00
Treehugger Robot
cd7db25738 Merge changes I7ec5a9f7,I76807f9b
* changes:
  Add docstrings for CriticalPathInfo
  Add long running jobs info
2023-03-15 07:26:40 +00:00
Jeongik Cha
cf833776a4 Add docstrings for CriticalPathInfo
Bug: 271526845
Test: n/a
Change-Id: I7ec5a9f7b39fd7441f1aac6556a77046a8210ae8
2023-03-15 12:54:14 +09:00
Jeongik Cha
4199d4796c Add long running jobs info
For the data to prioritize long running tasks in ninja, I added the
information about that.

Bug: 271526845
Test: build and check metrics
Change-Id: I76807f9b0d6a50d940b5f35dd6a9ef3cf693eec5
2023-03-15 12:46:58 +09:00
Jeongik Cha
58fa5a3f36 Merge "Add critical path infomation into metrics" 2023-03-15 03:40:11 +00:00
Treehugger Robot
79727bd236 Merge "Enable Wunqualified-std-cast-call globally" 2023-03-15 01:41:58 +00:00