Commit graph

76495 commits

Author SHA1 Message Date
Colin Cross
de05db0114 Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main am: 51428c451a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876767

Change-Id: I1829e71f021721ec043bda19f12f3fee34044bba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 23:15:42 +00:00
Colin Cross
51428c451a Merge changes I6f116385,Id77f514d,I73479de1,If58f4b53 into main
* changes:
  Convert ModuleProvder to generic providers API
  Convert OtherModuleProvider to generic providers API
  Convert Provider to generic providers API
  Convert SetProvider to generic providers API
2023-12-18 22:43:45 +00:00
Mårten Kongstad
736f453ddc Merge "Only include exported flags in android-flags.jar" into main am: 8070c4b457
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2878135

Change-Id: Iec7dbbd0b685a6be473bde2d8c79780e5a035c1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 21:01:16 +00:00
Mårten Kongstad
8070c4b457 Merge "Only include exported flags in android-flags.jar" into main 2023-12-18 20:31:31 +00:00
Colin Cross
7e3f9b43de Merge changes from topic "provider_generics" into main am: b2c65a26d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876763

Change-Id: Idd45d802713d4395abe9c233e71dc39f4d5b691e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 19:32:33 +00:00
Colin Cross
a471bff29b Use generics for providers API am: 3c0a83d19f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876762

Change-Id: I27279b2ebf557d4f9395cc713b8174f00a1ddc2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 19:32:31 +00:00
Colin Cross
a5458ee6ea Fix TestAarImportProducesJniPackages/aar-no-jni am: e8eeec913f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876761

Change-Id: I385316f548bc58bb67ff41051eb7ad7eb1a78f60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-18 19:32:25 +00:00
Colin Cross
b2c65a26d6 Merge changes from topic "provider_generics" into main
* changes:
  Convert NewProvider/NewMutatorProvider to generic providers API
  Use generics for providers API
  Fix TestAarImportProducesJniPackages/aar-no-jni
2023-12-18 19:15:39 +00:00
Mårten Kongstad
1258acfed3 Only include exported flags in android-flags.jar
The android-flags.jar file is consumed by apps built outside the
platform. These apps should only have access to exported flags (as
defined by the flag_declaration `is_exported` field).

Teach soong to filter out non-exported flags when generating
android-flags.jar.

Bug: 311151343
Test: m sdk dist # manually verify that $(gettop)/out/dist/android-flags.jar only contains exported flags
Change-Id: If66321fcffd920040dae3d99bd7ef69ff6925b18
2023-12-18 13:47:57 +01:00
Ludovic Barman
1e95f792a6 Merge "Rust protobuf 2->3: Update build system" into main am: cd11c9535f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2817733

Change-Id: Id22737ab06355a187d7defa997457e7c7af1aa4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-16 06:54:37 +00:00
Ludovic Barman
cd11c9535f Merge "Rust protobuf 2->3: Update build system" into main 2023-12-16 06:20:12 +00:00
Cole Faust
9582ba1e8d Merge "Sandbox camera-its" into main am: db0eeb5bdd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2874576

Change-Id: I07c6fbc970dfadac0e4f2b38a3e84dcac1d99b39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 22:22:05 +00:00
Cole Faust
db0eeb5bdd Merge "Sandbox camera-its" into main 2023-12-15 21:57:29 +00:00
Chris Antol
7752fc2274 Merge "Revert^5 "Enable dex container (DEX v41) for the whole system"" into main am: 6482cb97cd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876730

Change-Id: I0f11e266d94823f217cae73f81717bcfc54a1e01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 19:38:28 +00:00
Chris Antol
6482cb97cd Merge "Revert^5 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-15 19:01:34 +00:00
Chris Antol
a33691288e Revert^5 "Enable dex container (DEX v41) for the whole system"
This reverts commit d45836eb38.

Reason for revert: Still breaks tests

Bug: 314212435
Change-Id: I35867878c9a8b2aa3d64092a5326c42191569adc
2023-12-15 18:15:51 +00:00
David Srbecky
354153aa2e Merge "Revert^4 "Enable dex container (DEX v41) for the whole system"" into main am: a6bc7c87bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2859465

Change-Id: I896f0dedd5bb75eac96d75d470297ff102a7ab4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 13:34:38 +00:00
Ludovic Barman
19739bf6a5 Rust protobuf 2->3: Update build system
tldr: remove protobuf2 from Android Rust and upgrade everything to pb3.

These commits update:
- The grpcio rust crate to use protobuf 3
- The build system to always use the new libprotobuf (pb3) instead of the _deprecated variant (for pb2); they also force-enable libprotobuf everywhere, ignoring the use_protobuf3 flag, removes the tests related to pb2
- The following modules, which required syntax changes:
-- packages/modules/Bluetooth
-- device/google/cuttlefish
-- vendor/auto

Bug: 308790516
Test: m rust
Ignore-AOSP-First: must be done in main to upgrade cuttlefish+vendor with the rest all at once
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7d0783ce22b3d7d369786d4b16067c79c033185b)
Merged-In: I1d07c433aca41ccfe2e710821cf930c413dc12d6

Change-Id: I1d07c433aca41ccfe2e710821cf930c413dc12d6
2023-12-15 13:23:33 +00:00
David Srbecky
a6bc7c87bd Merge "Revert^4 "Enable dex container (DEX v41) for the whole system"" into main 2023-12-15 13:05:51 +00:00
Cole Faust
f64f9f5be6 Merge "Reapply "Handle symlinks in sbox"" into main am: b0a21dc871
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2876597

Change-Id: I83d57fccedf5ad0b7249ec945a069b4d9b406333
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-15 02:27:53 +00:00
Cole Faust
b0a21dc871 Merge "Reapply "Handle symlinks in sbox"" into main 2023-12-15 02:00:40 +00:00
Colin Cross
5a37718c95 Convert ModuleProvder to generic providers API
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the
type-safe android.SingletonModuleProvider API.

Bug: 316410648
Test: builds
Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
2023-12-14 16:12:22 -08:00
Colin Cross
313aa5475f Convert OtherModuleProvider to generic providers API
Convert all of the callers of OtherModuleProvider/OtherModuleHasProvider
to use the type-safe android.OtherModuleProvider API.

Bug: 316410648
Test: builds
Change-Id: Id77f514d68761a262d9ea830a601dbed804bbbe5
2023-12-14 16:12:22 -08:00
Colin Cross
ff694a8c88 Convert Provider to generic providers API
Convert all of the callers of Provider/HasProvider to use the type-safe
android.ModuleProvider API.

Bug: 316410648
Test: builds

Change-Id: I73479de1625fa2865b6c73444cd477e50d56dc5a
2023-12-14 16:12:21 -08:00
Colin Cross
3c0a83d19f Use generics for providers API
Using generics for the providers API allows a type to be associated
with a ProviderKey, resulting in a type-safe API without that doesn't
require runtime type assertions by every caller.

Unfortunately, Go does not allow generic types in methods, only in
functions [1].  This prevents a type-safe API on ModuleContext, and
requires moving the API to be functions that take a ModuleContext as
a parameter.

This CL creates the new API, but doesn't convert all of the callers.

[1] https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#no-parameterized-methods)

Bug: 316410648
Test: builds
Change-Id: I3e30d68b966b730efd968166a38a25cc144bd6de
2023-12-14 16:12:20 -08:00
Colin Cross
e8eeec913f Fix TestAarImportProducesJniPackages/aar-no-jni
TestAarImportProducesJniPackages was attempting to assert that an
aar_import module always had a JniPackageProvider, but was instead
asserting that the return type was always a JniPackageInfo.  Since
ModuleProvider returned the zero value of JniPackageInfo even when
there was no provider that was always true.

Fix aar_import to always set JniPackageProvider.

Test: TestAarImportProducesJniPackages
Change-Id: Idaf106e14373490d4eb807892e174aaaf094bbcf
2023-12-14 16:12:20 -08:00
Colin Cross
bc7d76cca2 Convert NewProvider/NewMutatorProvider to generic providers API
Convert all of the callers to NewProvider and NewMutatorProvider
to use a generic type parameter instead of an example object.

Bug: 316410648
Test: builds
Change-Id: Ic9cdafc87336e26730d3fd596df05de0e7267542
2023-12-14 16:12:20 -08:00
Colin Cross
402130276c Convert SetProvider to generic providers API
Convert all of the callers of SetProvider to use the type-safe
android.SetProvider API.

Bug: 316410648
Test: builds
Change-Id: If58f4b5355264ddab2045bc3591a4eac19cd58fc
2023-12-14 16:12:20 -08:00
Cole Faust
ca355af1fc Reapply "Handle symlinks in sbox"
This reverts commit 6a855191bd.

Reason for revert: Last issue fixed with aosp/2875001

Change-Id: I961ea6d97c936df8a6475995b768a7eda861e6ee
2023-12-14 23:38:38 +00:00
Cole Faust
0d3d2fd617 Merge "Add sdk_genrule" into main am: 0d6bb34801
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2871228

Change-Id: I159924525ba338799500cdac03fc9c612875b493
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-14 22:20:38 +00:00
Cole Faust
1a09b13d93 Merge "Allow compile_data on all java modules" into main am: c01104234e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2875178

Change-Id: I43abbf6833fade5aa91906a11c79a94d1bd38b50
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-14 22:19:16 +00:00
Cole Faust
0d6bb34801 Merge "Add sdk_genrule" into main 2023-12-14 21:58:10 +00:00
Cole Faust
c01104234e Merge "Allow compile_data on all java modules" into main 2023-12-14 21:44:46 +00:00
Yu Liu
10d22de5d3 Merge "Properly package aconfig files for vendor partition" into main am: a1df1a5937
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2875174

Change-Id: Ia9619b2acb34c6d2f3746619bfcc86aebe7645e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-14 19:52:37 +00:00
Yu Liu
a1df1a5937 Merge "Properly package aconfig files for vendor partition" into main 2023-12-14 19:14:11 +00:00
Treehugger Robot
35c138a662 Merge "Revert "Handle symlinks in sbox"" into main am: a53330a525
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2874577

Change-Id: I307dff0c64123fd005b2663bf4c09f0a7440c88b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-14 02:27:47 +00:00
Cole Faust
2b64af861a Allow compile_data on all java modules
art java_test modules need to specify compile_data, make it common
to all java modules.

Bug: 307824623
Test: m lint-check
Change-Id: I68640f14137f9cadaf0c454d3b5abc9e2d1d9b4b
2023-12-13 18:22:18 -08:00
Treehugger Robot
a53330a525 Merge "Revert "Handle symlinks in sbox"" into main 2023-12-14 01:58:17 +00:00
Treehugger Robot
36a499100d Merge "Enable Soong's tradefed_binary to support multi-arch" into main am: 453afad7b5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2849275

Change-Id: I8e4fb6db12940f7653831b228eb1d3e2b766a85f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-14 01:22:10 +00:00
Yu Liu
6dc93f9a09 Properly package aconfig files for vendor partition
Bug: 311173471
Test: Unit tests
Change-Id: Ibb857b69c3f83326a9ff5732e11dd09887e4ba6e
2023-12-14 01:19:35 +00:00
Treehugger Robot
453afad7b5 Merge "Enable Soong's tradefed_binary to support multi-arch" into main 2023-12-14 00:55:37 +00:00
Cole Faust
6a855191bd Revert "Handle symlinks in sbox"
This reverts commit 14a2362183.

Reason for revert: Breaks art tests on errorprone build

Change-Id: I2e21867fba6c8c1660ffa564273b6200c63221f3
2023-12-13 23:48:11 +00:00
Treehugger Robot
2553359fcb Merge "Avoid -target riscv64-linux-androidVanillaIceCream." into main am: 3e22fe2193
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2871232

Change-Id: Ic1815dba0d4585177009052d33d19b7c8961ecc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-13 23:26:47 +00:00
Cole Faust
776146b3f4 Sandbox camera-its
It was fixed with aosp/2866315.

Bug: 307824623
Test: ./build/soong/tests/genrule_sandbox_test.py camera-its
Change-Id: Iaf3871682e99ceb7161c159acb757ce2949f5b3d
2023-12-13 15:15:26 -08:00
Treehugger Robot
3e22fe2193 Merge "Avoid -target riscv64-linux-androidVanillaIceCream." into main 2023-12-13 22:48:56 +00:00
Cole Faust
8fc38f3761 Add sdk_genrule
Some users want to repackage the results of an sdk module.
Genrules have 3 variants: linux, android, and common_os. The common_os
one produces a snapshot zip file that users want. In order to get
access to it, we need a genrule in the same variant, so create
an sdk_genrule for that.

The sdk_genrule shouldn't have linux/android variants either, because
those other variants would get errors when trying to depend on the
sdk modules because the snapshot zip doesn't exist in those other
variants. The code in arch.go needs to be tweaked to allow a common_os
variant without the other variants.

Bug: 315962165
Test: m dist out/dist/art_release.zip
Change-Id: Idc9b3cae7a525d71aed6bafa0f8724a89f75a94b
2023-12-13 14:11:24 -08:00
Elliott Hughes
a19d9597cb Avoid -target riscv64-linux-androidVanillaIceCream.
clang silently ignores such things rather than reporting them as errors.

With this change, verbose.log.gz says android10000 instead, as expected.

Bug: https://buganizer.corp.google.com/issues/315788463#comment24
Test: treehugger
Change-Id: I0d92b0747912f28065de0d2dc6b4d33d1c2c9857
2023-12-13 12:10:28 -08:00
Cole Faust
50bf81caef Merge "Reapply "Handle symlinks in sbox"" into main am: a1eb34a709
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2866315

Change-Id: Ic6d8bccf6fda80c325476c731695b56e85725538
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-13 18:30:53 +00:00
Cole Faust
a1eb34a709 Merge "Reapply "Handle symlinks in sbox"" into main 2023-12-13 17:47:07 +00:00
Treehugger Robot
f5030737a6 Merge "Update wording on depfile property error" into main am: e25374a962
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2871077

Change-Id: I48104401036f6a771708dd6e1fa410d0719b4f93
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-12-13 03:55:03 +00:00