Commit graph

81668 commits

Author SHA1 Message Date
Yu Liu
24cd8c3756 Merge "Only link the profile extras lib for device variant for rust." into main 2024-04-25 22:45:57 +00:00
Colin Cross
21ed4694c5 Allow overriding android_library_import manifests
Some of the androidx libraries have a transformed manifest
alongside that needs to be used to avoid introducing extra
androidx.startup provider entries.  Add a manifest property
that allows overriding the manifest provided by the aar file.

Bug: 336549758
Test: examine PermissionController.apk
Ignore-AOSP-First: submitting in topic with internal CL
Merged-In: I5c8daf810d2fde9a150cbfe48b4f4216f5d1ba0d
Change-Id: I5c8daf810d2fde9a150cbfe48b4f4216f5d1ba0d
2024-04-25 20:46:22 +00:00
Paul Duffin
58cfc9af9b Pass API surface specific extension jars to Metalava
Previously, it would only pass `public` extension jars. This change
fixes that so it passes the jars for the API surface being generated.

Bug: 336993217
Test: m out/target/common/obj/PACKAGING/api_versions_public_generated-api-versions.xml \
        out/target/common/obj/PACKAGING/api_versions_system_generated-api-versions.xml
      # Compare the following files to make sure that they include public extension
      # APIs and system extension APIs respectively.
      diff \
          out/soong/.intermediates/frameworks/base/api/api_versions_public/android_common/*/metalava_exportable.sbox.textproto \
          out/soong/.intermediates/frameworks/base/api/api_versions_system/android_common/*/metalava_exportable.sbox.textproto
Change-Id: I02e2ec3c8176cfbc3cbd8ac56fb78d12b765eedb
2024-04-25 19:04:32 +01:00
Hsin-Yi Chen
f6fc525a1a Let header-abi-linker filter llndk, apex, and systemapi symbols
This commit adds --include-symbol-tag and --symbol-tag-policy to
header-abi-linker commands. The arguments make header-abi-linker load
the symbols tagged with llndk/apex/systemapi from the version script.
It filters the function declarations by the symbols. The output dumps
will not contain unfinalized ABI.

Test: make findlsdumps
Bug: 333532038
Change-Id: I28234a3749f389b8a5a09ac84341b1fcd1ee88a6
2024-04-25 23:11:49 +08:00
Hsin-Yi Chen
473b3557f1 Merge "Split APEX ABI dumps from implementation ABI dumps" into main 2024-04-25 14:58:20 +00:00
Hsin-Yi Chen
98da02128c Split APEX ABI dumps from implementation ABI dumps
This commit adds a rule that builds APEX ABI dumps separately from the
implementation libraries' ABI dumps. The rule takes the
export_include_dirs and the symbol_file of the stubs as parameters.
The dump paths are tagged with "APEX" in lsdump_paths.txt. The script
updating the prebuilt reference dumps can differentiate the APEX dumps
from the opt-in dumps tagged with "PLATFORM".

This commit also adds an ABI diff rule. Soong compares the APEX ABI
dumps with the reference dumps in version 35. It compares the
implementation dumps with the reference dumps in old versions.

Bug: 333532038
Test: make
Change-Id: I76902a8e3b7d0e96a5ad756f493924371cd7ad3c
2024-04-25 17:57:29 +08:00
Treehugger Robot
a559cab24a Merge "add flag_value.redacted" into main 2024-04-25 00:13:34 +00:00
Treehugger Robot
c66702491f Merge "Shard rust protobuf sources" into main 2024-04-24 23:02:54 +00:00
Treehugger Robot
fa6dac201d Merge "crunch_flags: keep-sorted lines are not descriptions" into main 2024-04-24 21:39:32 +00:00
Cole Faust
703248196c Merge "Keep replace_instead_of_append in arch prop structs" into main 2024-04-24 21:36:17 +00:00
Kevin Liu
0c07d46585 Merge "Added Strict_mode logic catch direct usage of Robolectric reference" into main 2024-04-24 20:58:27 +00:00
LaMont Jones
ccb2207cfa add flag_value.redacted
When set, this removes all traces of the flag from the release config.

Bug: 328495189
Test: manual
Change-Id: Iab39d06e134bfc020ba4875c1b8e89c5cdf18924
2024-04-24 13:06:14 -07:00
LaMont Jones
11209e1255 crunch_flags: keep-sorted lines are not descriptions
Also fix a typo in parsing declare-release-config.

Bug: 328495189
Test: manual, TH
Change-Id: Ibfed4a217275df0dd6bd9c2fb124e0d1f791be08
2024-04-24 13:05:55 -07:00
Cole Faust
5fda87b822 Keep replace_instead_of_append in arch prop structs
replace_instead_of_append is read by proptools.ExtendProperties() /
proptools.ExtendMatchingProperties(). These functions are called on
arch property structs, so we need to preserve it when creating the
arch property structs.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ic08704d8a2b710f5a5d99b62d3f8a37730bb6013
2024-04-24 11:21:14 -07:00
Kevin Liu
cab89b51c3 Added Strict_mode logic catch direct usage of Robolectric reference
When Strict_Mode is true, exclude Robolectric_all-target_upstream from the build pass, instead use the newly added robolectric_all-target_runtime, which compiles the robolectric lib into jar and later being added to final test jar.

Test: atest MyRoboTests
Bug: 334089788
Change-Id: I59291e3cc478e73f65950886853732ff0c5c5db7
2024-04-24 16:54:30 +00:00
Jeff DeCew
4fd15223fe Ensure aconfig generated CustomFeatureFlags is renamed by JarJar
Bug: 336768870
Flag: NA
Test: presubmit
Change-Id: I40a2763724066118e051a9ca0b88e5a9e5d76adf
2024-04-24 14:25:38 +00:00
Spandan Das
79cd6899c7 Remove cc_api_library related code from sdkMutator
This module type was used for multi-tree, which has since been
deprioritized.

Test: go test ./cc
Change-Id: If661aa1215022301cfa10cbe2cec4565faf89c14
2024-04-23 23:52:15 +00:00
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
Colin Cross
f526863a40 Shard rust protobuf sources
Shorten the command line for generating rust protobuf sources
by sharding the sources into groups of 50 source files.

Bug: 322564768
Bug: 336323108
Test: builds
Change-Id: Ia8069cdaf49f9a42d14a83139545ba61277418e0
2024-04-23 10:47:00 -07: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