Commit graph

81598 commits

Author SHA1 Message Date
Spandan Das
6d2656ef10 Add .swp files to .gitignore
Test: N/A
Change-Id: I410c5b732b0284562fa0e6312befcecf73c838d3
2024-04-23 23:51:45 +00:00
Ted Bauer
b39c877ae0 Merge "Add aconfig storage API deps to codegened lib" into main 2024-04-23 22:56:50 +00:00
Weijia He
3835928537 Merge "Generate test lists for Ravenwood and Robolectric tests" into main 2024-04-23 22:54:37 +00:00
Ellen Arteca
5e94e60cb7 Merge "Adds support to bindgen to handle static inline fcts" into main 2024-04-23 20:29:00 +00:00
Treehugger Robot
88b3e0c33b Merge "Ignore the .vscode/ folder" into main 2024-04-23 19:40:46 +00:00
Ted Bauer
f0f18591a5 Add aconfig storage API deps to codegened lib
Change-Id: I4991c9fccb0a0bab15457883cf20aacb3142c4cf
2024-04-23 18:25:26 +00:00
Cole Faust
243e704ed0 Ignore the .vscode/ folder
Test: Presubmits
Change-Id: I3c500c8fca69c43529ef498870b659abd5654767
2024-04-23 09:56:01 -07:00
Paul Duffin
a4362b937a Merge "Use new --api-lint-previous-api" into main 2024-04-23 13:04:16 +00:00
Rico Wind
8a2427cad2 Merge "Enable non final ids for non BusyBox builds" into main 2024-04-23 04:03:24 +00:00
Treehugger Robot
4eecd990d9 Merge "Add more comments about soong config variables" into main 2024-04-23 01:14:46 +00:00
Treehugger Robot
d47220d470 Merge "Add support to Soong config list variable" into main 2024-04-23 01:14:44 +00:00
Ellen Arteca
810c37ec1e Adds support to bindgen to handle static inline fcts
Adds support for bindgen to be able to handle `static inline`
functions. This is done by adding a new boolean field to the `BindgenProperties`
struct, `Handle_static_inline` (default to false).
If this field is true, then the flags to trigger bindgen support of
static inline functions are passed in.

The rust-bindgen documentation list two ways of handling `static inline`
functions, both specified with command line args.
1) --generate-inline-functions
2) --experimental --wrap-static-fns

Option 1 requires some extra effort on the part of the C library developer, in
that they have to expose the function symbols: the docs (linked below) explain
that this is often done by compiling the library with inlining disabled, which
can be detrimental to performance.

Option 2 requires no effort on the part of the C library developer, but it does
require the `--experimental` flag, since this feature is still under development.

This CL goes with option 2.

Relevant docs: https://github.com/rust-lang/rust-bindgen/discussions/2405

This CL also adds a new test: TestBindgenHandleStaticInlining in bindgen_test.go

Test: m blueprint_tests
Change-Id: If28000e3f3ccecc65c4cae1c62d7bf455454239a
2024-04-23 00:48:25 +00:00
Treehugger Robot
b0a4e48c15 Merge "PackageFile for permission/*.xml for sdk_library" into main 2024-04-22 23:20:39 +00:00
Treehugger Robot
affbd19c64 Merge "Include stubs type in metalava.rsp filename" into main 2024-04-22 23:15:59 +00:00
Yi Kong
aff61bf52e Merge "Revert^3 "Upgrade to clang-r522817"" into main 2024-04-22 23:05:29 +00:00
Yi Kong
33fb507271 Revert^3 "Upgrade to clang-r522817"
This reverts commit 7a4012586b.

Still more build breakages...

Change-Id: I2081d68e37bf260da78c651bb8fb9ae0d05b4c37
2024-04-22 23:04:07 +00:00
Paul Duffin
0a71d7329d Use new --api-lint-previous-api
Bug: 327019023
Test: ./gradlew
Change-Id: Ief4d7380e7242dff4e82df96778af17d56c4fe82
2024-04-22 23:48:19 +01:00
Jihoon Kang
421c1cd796 Include stubs type in metalava.rsp filename
Currently, metalava.rsp filepath for both the everything and the
exportable stubs type are identical, which may lead to incremental build
issues. This change resolves such issue by including the stubs type in
the metalava.rsp filename.

These files cannot be modified as ".../everything/metalava.rsp" and
".../exportable/metalava.rsp" as `FlagWithRspFileInputList(...)`
enforces the rsp filepath to be outside of the outdir, which is
".../everything/" and ".../exportable/", respectively. Thus, this change
continues to generate the rsp file to be generated in the module outdir,
but modifies the name of the rsp files as "everything.metalava.rsp" and
"exportable.metalava.rsp".

This change also simplifies the parameters in metalavaCmd(...) for the
simplicity of the method parameters.

Test: m nothing and inspect output for the everything and the exportable stubs
Bug: 336360490
Change-Id: Ifd4e89ef69808e79ea720199677585f0217f7c1c
2024-04-22 21:29:05 +00:00
Jeongik Cha
00e0991f70 PackageFile for permission/*.xml for sdk_library
Bug: 333311683
Test: build android.bp system image and then check if there is
permission xml file for sdk_library

Change-Id: If5ac1975a7db10d85a1b11c1cd666051e3da546e
2024-04-23 05:49:44 +09:00
Colin Cross
a17792e2eb Merge "Remove more unused code" into main 2024-04-22 18:50:08 +00:00
Colin Cross
757e88a9df Merge "Convert apex mutator to a TransitionMutator" into main 2024-04-22 18:32:22 +00:00
Cole Faust
68305164c3 Merge "Revert^2 "Make embedded_launcher true by default"" into main 2024-04-22 17:40:11 +00:00
Yi Kong
7252e3289d Merge "Revert^2 "Upgrade to clang-r522817"" into main 2024-04-22 17:06:24 +00:00
Rico Wind
7152e82a42 Enable non final ids for non BusyBox builds
Non final ids is a prerequisite for using optimized shrinking and
it will soon be a hard R8 error if you pass final ids in R classes
with optimized shrinking enabled.

Bug: 325905703
Test: SystemUIGo with optimized shrinking
Change-Id: I364edc5a0b22be7b4d737c2aa470a84704d05283
2024-04-22 11:24:36 +00:00
Yi Kong
7a4012586b Revert^2 "Upgrade to clang-r522817"
This reverts commit 321dd23b34.

Breakage is fixed by https://r.android.com/3051002.

Change-Id: I70925c7aa01fb78ec701971ee97192993aef0edd
Test: abtd
Bug: 322868540
2024-04-22 07:22:02 +00:00
Sorin Basca
db70a80cc7 Merge "Add Java 21 as a known version" into main 2024-04-22 07:08:02 +00:00
Inseob Kim
aa1ce0385c Add more comments about soong config variables
Bug: 329208946
Test: N/A
Change-Id: I68a5e59bc095f5c23509993675f26ed903bcbc78
2024-04-22 14:52:23 +09:00
Inseob Kim
02c8618e1b Add support to Soong config list variable
List variables act similar to value variables. Each value in a list
variable will be added to a list property after string substitution.

Bug: 329208946
Test: m --no-skip-soong-tests
Test: m selinux_policy_system_soong
Change-Id: I1127bfb0798e7e5f7d665f647307224d5ff5d790
2024-04-22 14:51:07 +09:00
Weijia He
299d62dd51 Generate test lists for Ravenwood and Robolectric tests
Modify the Ravenwood and Robolectric test suite packaging rules to output a zip file containing the list of test modules contained in the suite.

This is required for supporting Test Mapping with these suites. More specifically, Test Mapping infrastructure uses the test list to determine whether any of the configured TEST_MAPPING file entries reference test modules included in the suite.

Bug: 333895151
Change-Id: I4cb2ff70c799c1c3064c96e04fad11ff0694f51a
Test: m nothing --no-skip-soong-tests
Test: m ravenwood-tests robolectric-tests
Signed-off-by: Weijia He <hwj@google.com>
2024-04-19 23:10:35 +00:00
Treehugger Robot
d50832c122 Merge "Add TestOnlyProvider for test_module_config" into main 2024-04-19 20:33:34 +00:00
Treehugger Robot
40639d7d7a Merge "Support passing multiple last api files to metalava in droidstubs" into main 2024-04-19 20:01:32 +00:00
Spandan Das
2182c08f3e Merge "Drop use_source_config_var from prebuilt selection" into main 2024-04-19 18:44:28 +00:00
Jihoon Kang
5623e5425a Support passing multiple last api files to metalava in droidstubs
This change supports passing multiple last api files to metalava,
instead of emitting an error when multiple files are passed as inputs.

The last api file providing modules are filegroups or genrule modules
that output exactly one output file. This change modifies that behavior
so that the filegroups can output multiple api files.

The last api file providing modules are (mostly) generated from the
`prebuilt_apis` sdk module. However, these modules only provide a single
api scope txt files (e.g. system api scope last api file filegroup
would only provide last system api file, not system + public). This
change modifies `prebuilt_apis` by generating "combine" filegroup
modules, that include api files of the subset api scopes as well.

The ordering of the files are handled when generating the combined api
filegroup modules, and droidstubs module does not check whether the
passed api files are in order from the narrowest api scope to the widest
api scope.

Submission of this change will be done once metalava fully supports
handling multiple api files input for api lint and nullness migration.

Test: m nothing
Bug: 321827591
Change-Id: I2066e7ceb7ee7c6d0fd87cd43bfd08db906d4b8f
2024-04-19 10:56:32 +01:00
Paul Duffin
d3b020a8c3 Enable system and module-lib APIs in TestSnapshotWithJavaSystemModules
A follow-up change broke `TestSnapshotWithJavaSystemModules()` during
development. The code was fixed but it revealed an issue with the test
coverage of that test. That test only supported `public` APIs and the
fix could have had different behavior on `system` and `module-lib`
APIs. This change adds them to the test to make sure that the follow-up
change works correctly for them too.

Test: m --no-skip-soong-tests nothing
Bug: 321827591
Change-Id: I3b5570f5d4f0764ae365bfc448f287b50b9c2686
2024-04-19 10:56:32 +01:00
Sorin Basca
1fe2cc883f Add Java 21 as a known version
Bug: 335612268
Test: Set java_version to 21 in core-all && m
Change-Id: Ie2093187cec75949ae3bb4903edfb6f62aa31f6e
2024-04-19 10:45:55 +01:00
Phenix Chen
2ddb22ce99 Merge "Revert "Upgrade to clang-r522817"" into main 2024-04-19 06:35:35 +00:00
Phenix Chen
321dd23b34 Revert "Upgrade to clang-r522817"
This reverts commit dccbef36a4.

Reason for revert: Potential culprit for b/335755564

Change-Id: I3fd02f2b08ad94a4e022cbebcd96afc2fab2e1d8
2024-04-19 05:30:10 +00:00
Ronald Braunstein
d245346df5 Add TestOnlyProvider for test_module_config
This one is trivial as these modules are always tests and
top-level-test-targets and don't have any complicated struct composition

This requires aosp/3045317 for "m all_teams" to work for
test_module_config_host.

Test: go test ./tradefed_modules
Test: m all_teams
Change-Id: I229e7690088e996452784183a852325c3003ee93
2024-04-19 03:17:41 +00:00
Treehugger Robot
1f0aeb0644 Merge "Prefer variants test-only:true attribute when grouping." into main 2024-04-19 03:15:30 +00:00
Treehugger Robot
d4ad78f447 Merge changes from topic "lamont-build-tools-build-flag" into main
* changes:
  Bootstrap out/release-config early
  Add crunch-flags and build-flag binaries
  release_config: cleanup how we emit results
  Print a warning on redundant overrides
  Add description to release_config_map message
2024-04-19 00:57:39 +00:00
Ronald Braunstein
587c40f216 Merge "Implement test-only for python_ rules" into main 2024-04-18 22:59:54 +00:00
Ronald Braunstein
c864b242da Prefer variants test-only:true attribute when grouping.
When looking at more details of modules that are marked test-only, I saw
that `java_test_host` modules were not in the list.

The test I wrote for it passes, but in a real run, there are two variants (one
windows, one linux) which causes it to fail.  The `all_teams` code visis
all variants, even not enabled ones. The windows variant, for which
GenerateAndroidBuildActions was not being called, did not have a
provider and its empty data was overriding the variant for which we had
data.

I changed the code to prefer variants where it is true.
Generally for "test-only", the value is logically true independent of variant, so
if one variant sets it true, it should be considered true for all
variants.
I think this is a slightly better check than preferring a variant with a
provider or that is enabled.

Prev CL
       % gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.test_only = true and teams.kind not like "%cc_%" group by teams.kind'
        +--------------------------+----------+
        |        teams.kind        | count(*) |
        +--------------------------+----------+
        | android_test             |     1382 |
        | android_test_helper_app  |     1680 |
        | java_fuzz                |        5 |
        | java_test                |      774 |
        | java_test_helper_library |       29 |
        +--------------------------+----------+

After
	 gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto ~/aosp-main-with-phones/build/soong/android/team_proto/team.proto:AllTeams ' select teams.kind, count(*) where teams.test_only = true and teams.kind not like "%cc_%" group by teams.kind'
	+--------------------------+----------+
	|        teams.kind        | count(*) |
	+--------------------------+----------+
	| android_test             |     1382 |
	| android_test_helper_app  |     1680 |
	| csuite_test              |       16 |
	| java_fuzz                |       10 |
	| java_test                |      774 |
	| java_test_helper_library |       35 |
	| java_test_host           |      495 |
	+--------------------------+----------+

Test: go test ./android
Test: m all_teams
Test: m blueprint_tests
Change-Id: Idc5ed1c0375dc7390a0d58fcb4bf0d7fe1c7ab4f
2024-04-18 15:56:54 -07:00
Spandan Das
7e674e69ef Drop use_source_config_var from prebuilt selection
This CL makes this property a no-op from the perspective of prebuilt
selection. The primary user of this was mainline modules, but they have
now switched to RELEASE_APEX_CONTRIBUTIONS_* for prebuilt selection,
both for internal `main` development and in partner drops.

Test: in internal, lunch cf_x86_64_phone-next-userdebug; m nothing; and
verified there was a path to the prebuilt bt apex

Test: in partner workspace, lunch gsi_partner_arm-ap31-userdebug; m
nothing; and verified that there was a path to the prebuilt adservices apex

Bug: 308188211
Change-Id: I124a6dada5c20aca4bdebf70dcbe5bbec28cefbe
2024-04-18 22:35:42 +00:00
Yi Kong
7694cdd6ba Merge "Upgrade to clang-r522817" into main 2024-04-18 22:29:26 +00:00
Colin Cross
7c035064db Convert apex mutator to a TransitionMutator
Replace the apex mutator with a TransitionMutator.  Requires moving the
base.apexInfo value into a provider so that it is still present for the
Mutate pass.

Test: go test ./...
Test: no change to out/soong/build-${TARGET_PRODUCT}.ninja
Change-Id: I1c898eaf30b4021f0f96f439cc0b3b3173710fc7
2024-04-18 15:08:43 -07:00
Cole Faust
f09101e78d Revert^2 "Make embedded_launcher true by default"
This reverts commit 578066be90.

Reason for revert: Relanding

Change-Id: I63f01362cc11c02c4800ae1c21652c7cf4b8a799
2024-04-18 18:33:15 +00:00
LaMont Jones
e292efada4 Bootstrap out/release-config early
Bug: 328495189
Test: manual
Change-Id: I4e9d6eba21da128adc7d8eab097ade2e69b4cbcc
2024-04-18 11:21:03 -07:00
LaMont Jones
b9014c74f4 Add crunch-flags and build-flag binaries
- crunch-flags automates converting build flags from starlark to protobuf.
- build-flag is used to set, get and trace flag values.

Bug: 328495189
Test: manual
Change-Id: I941a4420a8bdfa2df73d94e52b3f34a6d1ea3278
2024-04-18 11:21:03 -07:00
LaMont Jones
14e2ac68e3 release_config: cleanup how we emit results
- Allow each of the formats (json, pb, textproto) to be individually
   controlled.
 - Include product and release in the name of the aritfact.

Bug: 328495189
Test: manual
Change-Id: Ia08e7224200a48994bea882a61b8199d53576d38
2024-04-18 11:21:03 -07:00
LaMont Jones
7ac07deb9b Print a warning on redundant overrides
Bug: 328495189
Test: manual
Change-Id: I35bff9d6751e9aa304e4c2d7e24b9a44a3994264
2024-04-18 10:25:25 -07:00