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
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
Bug: 333311683
Test: build android.bp system image and then check if there is
permission xml file for sdk_library
Change-Id: If5ac1975a7db10d85a1b11c1cd666051e3da546e
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
This reverts commit 321dd23b34.
Breakage is fixed by https://r.android.com/3051002.
Change-Id: I70925c7aa01fb78ec701971ee97192993aef0edd
Test: abtd
Bug: 322868540
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
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>
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
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
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
* 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
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
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
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
- 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
- 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