Commit graph

5705 commits

Author SHA1 Message Date
Colin Cross
702ef0a07a Merge changes I70f81120,If8f2534e into main
* changes:
  Export ReverseSliceInPlace and ReverseSlice
  Make CopyOf generic
2023-07-07 17:07:50 +00:00
Colin Cross
b5e3f7dad5 Export ReverseSliceInPlace and ReverseSlice
... and add tests.

Test: TestReverseSliceInPlace, TestReverseSlice
Change-Id: I70f811207fdb2af891f7ef3fe19cbe5c7276135a
2023-07-06 16:36:50 -07:00
Colin Cross
13aeb689af Make CopyOf generic
Test: util_test.go
Change-Id: If8f2534ec454903eb967dc9ec0c8708096d1baff
2023-07-06 15:02:56 -07:00
Cole Faust
950689a9c2 Handle RepoMappingManifest actions
These are essentially FileWrite actions, like SourceSymlinkManifest.

However, currently aquery appears to give non-deterministic results
for the file content. Emit an empty file for now to avoid the
non-determinism.

Fixes: 288292933
Bug: 287539324
Test: Presubmits
Change-Id: Ieaf8aff0d58d2d69087e4e34dc99074a015e700c
2023-07-06 09:44:14 -07:00
Jingwen Chen
661b2ee719 Merge "Revert "add media.swcodec to Bazel prod allowlist"" 2023-06-30 04:23:40 +00:00
Treehugger Robot
bf815a135a Merge "Ensure we get cross refs for Bazel-built artifacts" 2023-06-30 02:22:27 +00:00
Trevor Radcliffe
061012475c Revert "add media.swcodec to Bazel prod allowlist"
This reverts commit b1274236e8.

Reason for revert: 
b/289418267

Change-Id: I0a94675e09a82b55d62e58dbeea0d3186c754ed3
2023-06-29 22:30:18 +00:00
Treehugger Robot
da169a1ee3 Merge "Fix FirstUniqueStrings after conversion to generics" 2023-06-29 18:46:20 +00:00
Trevor Radcliffe
cae9c84a56 Merge "add media.swcodec to Bazel prod allowlist" 2023-06-29 16:26:11 +00:00
Liz Kammer
36ba6b2347 Ensure we get cross refs for Bazel-built artifacts
Test: CI
Change-Id: I377dde648e023d1ac8e44b6e814475f7410cd2eb
2023-06-29 10:18:39 -04:00
Julien Desprez
bc332f6cd8 Merge "Add -sha256 to robolectric zip" 2023-06-29 00:17:54 +00:00
Spandan Das
557423d96e Merge "Remove special-casing of DCLA libraries" 2023-06-28 04:38:35 +00:00
Cole Faust
8ee97f7a20 Merge "Revert "Add unit test for parsing build files in bp2build"" 2023-06-27 22:52:59 +00:00
Cole Faust
3d927238cc Revert "Add unit test for parsing build files in bp2build"
This reverts commit e1f25230df.

Reason for revert: breaks bp2build ci

Change-Id: I7320ef679d8a1ba1d605cf0d3781854b97816358
2023-06-27 22:52:07 +00:00
Julien Desprez
f368073522 Add -sha256 to robolectric zip
This help limit the overhead of cas upload

Change-Id: I4e1dacb38cbebf882457297ddf047a1ad1166504
Test: presubmit
Bug: None
2023-06-27 20:48:05 +00:00
Colin Cross
48016d5a2f Fix FirstUniqueStrings after conversion to generics
The conversion of FirstUniqueStrings to be implemented on top of the
generic firstUnique accidentally used a different threshold to switch
from the list implementation to the map implementation.  Modify the
threshold of firstUnique to match the old value from FirstUniqueStrings
now that it doesn't have the reflection overhead.  While we're at it,
also make firstUnique make a copy of the list, and make FirstUniqueStrings
a pure wrapper around firstUnique.

Test: BenchmarkFirstUniqueStrings
Change-Id: Icc2febea663142c508ff2e4be65a8a68121631d5
2023-06-27 11:07:55 -07:00
Treehugger Robot
5694f595bb Merge "Add unit test for parsing build files in bp2build" 2023-06-27 17:46:09 +00:00
Spandan Das
2327d163a2 Merge "cc mixed build support to allowlist M13 libraries" 2023-06-27 17:27:49 +00:00
Yu Liu
b1274236e8 add media.swcodec to Bazel prod allowlist
Bug: 280339074
Test: CI
Change-Id: I56b858dbd95a85221440c020afd1eb1530c1a467
2023-06-27 00:15:06 +00:00
Spandan Das
95b24b1165 Remove special-casing of DCLA libraries
This is a revert of aosp/2449906

mixed build currently supports platform and apex variants of allowlisted
cc libraries. However when building apex variants, we would pass an
apexKey only for allowlisted _dcla_ libraries. This meant that for libraries in
mixed build allowlist but not in dcla allowlist, Soong's apex variants
were being replaced with Bazel's platform variants.

Bug: 270339610
Bug: 288906815
Test: Added libnativeloader, libartpalette-system to prod mixed build
allowlist and `m`

Change-Id: I922fed898b3c3961466cd1165c371839a4192237
2023-06-27 00:14:48 +00:00
Treehugger Robot
7376815e21 Merge "Handle no generated headers and exporting for xsd" 2023-06-26 21:20:46 +00:00
Spandan Das
40b79f8def cc mixed build support to allowlist M13 libraries
Propagate api_domain from top-level config_node(s) in mixed builds.
This ensures that cc_libraries are built in the correct config setting
in mixed builds

Test: m com.android.media.swcodec
Test: built and booted google variant of com.android.media.swcodec
Test: m ccodec_unit_test

Change-Id: I14e3c8e8358b5e90e71697584f9b0eceb018bfa9
2023-06-26 18:06:51 +00:00
Treehugger Robot
3da9587eda Merge changes from topic "revert-2637031-revert-2626204-rules_go_repo-OSFOZKENFO-KSSEOFEKLG"
* changes:
  Revert^2 "Symlink external/bazelbuild-rules_go in mock tests"
  Revert^2 "Always use the BUILD files from bazelbuild-rules_go"
2023-06-26 08:01:19 +00:00
Spandan Das
4a5bc5c587 Revert^2 "Always use the BUILD files from bazelbuild-rules_go"
51eee74a02

Change-Id: I86f2d4bb1e336c72a9c89e67598db8a1bdea6a2c
2023-06-26 03:44:04 +00:00
Joe Onorato
2f99c47a87 Add aconfig dump of all aconfig_declarations modules.
Bug: 283910439
Test: m dist ; m all_aconfig_declarations ; gqui from all_aconfig_declarations.pb proto /source/aosp-master-with-phones/build/make/tools/aconfig/protos/aconfig.proto:android.aconfig.parsed_flags
Change-Id: Ia89c7f9c53fa1600fa2f9c8ea01319e949e09f58
2023-06-23 15:21:42 -07:00
Treehugger Robot
a41c679fe1 Merge "Cleanup remaining android.JavaApiLibraryName() references" 2023-06-23 21:35:02 +00:00
Alix Espino
8131290360 Merge "bp2build conversion for rscript srcs in cc modules" 2023-06-23 20:29:09 +00:00
Liz Kammer
084d6a908f Handle no generated headers and exporting for xsd
Test: new bp2build unit tests
Test: build libvintf
Change-Id: I2c7bf409b30d78fcf6762d69139e3249a2b0d368
2023-06-23 15:48:16 -04:00
Jihoon Kang
019ffe121c Merge "Allow java_library.exclude_static_libs property for libcore and f/b/api" 2023-06-23 17:10:54 +00:00
Matthias Männich
2424ae6e39 Merge changes from topic "revert-2626204-rules_go_repo-OSFOZKENFO"
* changes:
  Revert "Always use the BUILD files from bazelbuild-rules_go"
  Revert "Symlink external/bazelbuild-rules_go in mock tests"
2023-06-23 07:55:32 +00:00
Matthias Männich
51eee74a02 Revert "Always use the BUILD files from bazelbuild-rules_go"
Revert submission 2626204-rules_go_repo

Reason for revert: breaks the aosp_kernel-build-tools (https://ci.android.com/builds/branches/aosp_kernel-build-tools/grid)
Reverted changes: /q/submissionid:2626204-rules_go_repo

Change-Id: I912050a50313fe6a951f675664035857d89c0194
2023-06-23 07:45:26 +00:00
Jooyung Han
3b7411adc7 Merge "Remove "flattened" apexes" 2023-06-23 04:09:48 +00:00
Treehugger Robot
896c6b09dc Merge changes from topic "rules_go_repo"
* changes:
  Symlink external/bazelbuild-rules_go in mock tests
  Always use the BUILD files from bazelbuild-rules_go
2023-06-22 23:54:44 +00:00
Colin Cross
313d32f730 Merge "Use generics for DepSets" 2023-06-22 20:57:01 +00:00
Colin Cross
c85750bfe3 Use generics for DepSets
Use Go's generics for DepSets so they don't require a type-specific
wrapper and reflection.

Test: depsets_test.go
Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
2023-06-22 08:18:33 -07:00
Joe Onorato
9cb6a722eb Merge changes from topic "aconfig_renames"
* changes:
  Rename device_config --> aconfig and definitions --> declarations
  Rename aconfig namespace to package.
2023-06-22 13:30:53 +00:00
Nikita Ioffe
4a241d0852 Merge "Update neverallow rules for init_first_stage" 2023-06-22 10:11:31 +00:00
Joe Onorato
981c926269 Rename device_config --> aconfig and definitions --> declarations
Bug: 285303012
Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done
Change-Id: I3375f46b3ecbbc516d1bee6ab3f80725fcccde8f
2023-06-21 15:16:23 -07:00
Nikita Ioffe
11a9c2c763 Update neverallow rules for init_first_stage
We are introducing Microdroid-specific variant of the init_first_stage,
and need to add init_first_stage_defaults and
init_first_stage.microdroid to the neverallow rule.

Bug: 287206497
Test: build com.android.virt APEX
Change-Id: I88543256ab0479d4676865ebb1d16d9d39f1f455
2023-06-21 16:51:09 +01:00
Alix
e266787aed bp2build conversion for rscript srcs in cc modules
Bazel does not support using .rscrip/.fs files as cc srcs.
For a module foo with foo srcs, Bp2build will create a bazel
target of rule class rscript_to_cpp with name foo_renderscript
which will have only the renderscript files as srcs.
Bp2build will also create a target foo with the expected cc rule class.
The foo target will have all other src files as srcs and will also
have the target foo_renderscript as another src.

Bug: 210509914
Test: bp2build testing & b build target rstest-latency
Change-Id: Ifdc55051a3595f5fcf54eab8b59e11e9351e141c
2023-06-21 14:58:10 +00:00
Jooyung Han
eec1b3fe26 Remove "flattened" apexes
Now soong doesn't build "flattened" apexes.

Bug: 279835185
Test: m nothing (soong tests)
Test: m && launch_cvd (cuttlefish)
Change-Id: Id3c540ece1a15cecacc185da9aa17285edd2f493
2023-06-21 14:29:26 +09:00
Treehugger Robot
be24d2733c Merge "Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES" 2023-06-21 05:18:58 +00:00
Usta (Tsering) Shrestha
1205d717cb Disallow java_test_host dependant
Bug: 287462798
Change-Id: I98cc7c9bb1d9fbaf3211284c02c85e0037e2059c
Test: ABTD run
2023-06-20 19:08:45 +00:00
Jooyung Han
eeeda8a94c Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
We will deprecate flattened apexes. In this change, GSI-specific make
variable (PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES) is removed. The
variable was used to install both image/flattened apexes in the GSI, so
that it works on ro.apex.updatable devices and not-updatable devices.

Now, GSI will have only image APEXes in it.

Bug: 278826656
Test: lunch gsi_arm64-userdebug && m # no flattened apexes
Change-Id: Ie5fe505b9f2a6a1687252513788fd3e16bc147c5
2023-06-20 14:31:39 +09:00
Chris Parsons
e1f25230df Add unit test for parsing build files in bp2build
This involves some minor changes to testing infrastructure.

Bug: 285631638
Fixes: 286545783
Test: unit test
Change-Id: If64ba29308d99e63a1cc5526feaf077f2cb14478
2023-06-16 21:09:19 +00:00
Spandan Das
7bdea7e56d Always use the BUILD files from bazelbuild-rules_go
This repository contains the core go rules

Test: TH
Bug: 284483729
Change-Id: I4385c84140f2e41bfa5e5cd5434a212c138f456a
2023-06-16 17:16:43 +00:00
Christopher Parsons
df9c3441aa Merge "Provide reason for unconverted bp2build modules" 2023-06-16 13:49:49 +00:00
Chris Parsons
39a169721c Provide reason for unconverted bp2build modules
This also changes the expectation of ConvertWithBp2build. Each
implementation must either create one or more Bazel target modules, or
mark the module as unconvertible (with a specific reason).

Manually verified no runtime hit in AOSP
In AOSP, the metrics file size increases from 252K to 1.6M

This changes some effective module counts in bp2build metrics:
 - Removes "package" modules from the module count list in
metrics, as these will not be converted like regular modules.
 - Counts Handcrafted modules as being "unconverted", as bp2build is not
   responsible for them.

Bug: 285631638
Test: Verified generated BUILD.bazel files are bit-for-bit identical
with this change
Test: Manually verified one case of each implemented reasonType

Change-Id: I308dd451d8f28379b15671dae9f931bd0446f5c1
2023-06-16 13:45:17 +00:00
Inseob Kim
55be40beb4 Merge "Fix soong config hash missing for some modules" 2023-06-16 11:28:19 +00:00
Inseob Kim
8ff69de0f7 Fix soong config hash missing for some modules
Bug: 279362051
Test: see outputs of C++ modules using soong config
Change-Id: I95e41350ff17a989faf7c010a4c4ed4fcd79d66b
2023-06-16 15:52:15 +09:00