Commit graph

96630 commits

Author SHA1 Message Date
Mårten Kongstad
7978682841 Merge "check-flagged-apis: parse API versions XML" into main 2024-04-17 14:41:32 +00:00
Treehugger Robot
e24a1e4ddc Merge changes I397b32ae,Ic244b896,I5ccf2a64 into main
* changes:
  check-flagged-apis: parse flag names and values
  check-flagged-apis: parse API signature files
  check-flagged-apis: add unit test infrastructure
2024-04-17 14:29:25 +00:00
Mårten Kongstad
b673d3bb7d check-flagged-apis: parse API versions XML
Teach check-flagged-apis to parse API versions XML; this represents the
APIs after metalava has processed the source and kept APIs as is, or
reverted them to the previous SDK snapshot, according to their
@FlaggedApi flags.

As with the API signature parser, limit support to fields to keep things
simple; support for classes and methods will be added in later CLs.

Note: `m sdk dist` will generate an API versions XML file.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt --flag-values out/soong/.intermediates/all_aconfig_declarations.pb --api-versions out/dist/data/api-versions.xml
Change-Id: I779a0d0cdb8a50536d3fc8d517fa38ba4b0dcd1c
2024-04-17 15:27:48 +02:00
Mårten Kongstad
387ff6cfe8 check-flagged-apis: parse flag names and values
Teach check-flagged-apis to parse the parsed_flags protobuf generated by
aconfig.

Note: `m all_aconfig_declarations` generates a protobuf file that
contains all info about all flags.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt --flag-values out/soong/.intermediates/all_aconfig_declarations.pb
Change-Id: I397b32ae2a373b429ef6ce22e0a06a0f15202b91
2024-04-17 15:27:48 +02:00
Mårten Kongstad
20de405dd5 check-flagged-apis: parse API signature files
Teach check-flagged-apis to extract flagged APIs from API signature files.

To keep things simple, only consider fields for now: support for classes
and methods will be added in a later CL.

Note: `m frameworks-base-api-current.txt` will generate an API signature
file that includes both the platform and mainline APIs.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Test: check-flagged-apis --api-signature out/target/product/mainline_x86/obj/ETC/frameworks-base-api-current.txt_intermediates/frameworks-base-api-current.txt
Change-Id: Ic244b896672569f44af793796189b34c1f9d0c36
2024-04-17 15:27:48 +02:00
Mårten Kongstad
f242ec8989 check-flagged-apis: add unit test infrastructure
Add scaffolding for unit tests.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I5ccf2a6424c19e739923379cdc41c359388484da
2024-04-17 15:27:45 +02:00
Treehugger Robot
9194b690b1 Merge "Add dependencies for module which define LOCAL_SOONG_INSTALL_PAIRS" into main 2024-04-17 09:43:53 +00:00
Treehugger Robot
7b986ab345 Merge "check-flagged-apis: add Flag value class" into main 2024-04-17 09:08:25 +00:00
Treehugger Robot
1dbe48454d Merge "check-flagged-apis: add Symbol value class" into main 2024-04-17 09:08:24 +00:00
Mårten Kongstad
dc3fc2e0bc check-flagged-apis: add Flag value class
Add a value class to represent Flag names. We could use plain Strings
but having a dedicated class (with no overhead compared to String) makes
the intent of the code much clearer.

Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: Icdd4fb97d3fd49e507b7559504ea173a3dc52dea
2024-04-17 09:54:53 +02:00
Mårten Kongstad
e0179976cd check-flagged-apis: add Symbol value class
check-flagged-apis will read contents from various sources, which use
different formats to represent the same piece information (e.g.
"class#field" or "<class><field>").

Introduce a Symbol value class to represent any API (i.e. a class, field
or method) in a unified format.

Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: Id9404294a87b23a9d43e5e13ce39ea5a92608e33
2024-04-17 09:54:53 +02:00
Hsin-Yi Chen
804f4eecb5 Merge changes I35b644fe,Iaec03bd3 into main
* changes:
  Fix check-abi-dump-list
  Define a make target for all APEX dumps
2024-04-17 06:11:31 +00:00
Mårten Kongstad
4feb33fefc Merge "check-flagged-apis: add support for command line options" into main 2024-04-17 05:52:09 +00:00
Mårten Kongstad
e2ec38c51b Merge "check-flagged-apis: add new CLI to verify @FlaggedApi APIs" into main 2024-04-17 05:51:48 +00:00
Hsin-Yi Chen
c851627d33 Fix check-abi-dump-list
- Fix the timestamp variable name.
- Convert the intermediate file name extensions to those in the
  prebuilt directory.
- Disable check-abi-dump-list for sanitizer and coverage builds.
- Add an exception for libRS, RISC-V.

Test: m check-abi-dump-list
Bug: 333532038
Change-Id: I35b644feed1bef1e6c74731e8f69074bdc5b0352
2024-04-17 13:05:02 +08:00
Hsin-Yi Chen
f46bc5add9 Define a make target for all APEX dumps
The SDK finalization process will create APEX ABI dumps from this
target.

Test: make findlsdumps_APEX
Bug: 333532038
Change-Id: Iaec03bd39923678141b12436e5a6b8576e63a999
2024-04-17 13:04:50 +08:00
T.J. Mercier
70533992f4 Merge "Add flags for cgroup v2 and memcg v2 features" into main 2024-04-16 21:40:38 +00:00
Daniel Zheng
2fc519a568 Merge "ota_from_target_files: read correct api level" into main 2024-04-16 19:32:37 +00:00
Daniel Zheng
dc411eda4c ota_from_target_files: read correct api level
ro.product.first_api_level looks like the value we actually want to read
to since it inherits from $PRODUCT_SHIPPING_API_LEVEL. Other variables
we attempted to look at were giving other values (e.g 202504 for pixel
watch)

Bug: 331202590
Test: th
Change-Id: Ied3da247cba45611132db6c9e3cdefb447891f96
2024-04-16 12:32:05 -07:00
Mina Granic
65e34c1138 Merge "Revert "Define a make target for all APEX dumps"" into main 2024-04-16 10:24:27 +00:00
Hsin-Yi Chen
1a9023376c Revert "Define a make target for all APEX dumps"
This reverts commit ea9f51d6f5.

Reason for revert: aosp_cf_arm64_only_phone_hwasan-trunk_staging-userdebug fails

Fixes: 335131824
Bug: 333532038
Change-Id: I4d4bd31ebd8af18bcc44eb9ee45c167cbde026b0
2024-04-16 10:23:18 +00:00
Linus Tufvesson
8fbc0cfa69 Merge "Use flag for min supported target sdk" into main 2024-04-16 09:13:29 +00:00
Hsin-Yi Chen
eb74e25ccb Merge "Define a make target for all APEX dumps" into main 2024-04-16 08:51:18 +00:00
Mårten Kongstad
acfeb11d86 check-flagged-apis: add support for command line options
Use clikt as the command line options parser library.

Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: I7c406456b00e29293294dcdbef411d2543a1e8d5
2024-04-16 10:32:17 +02:00
Mårten Kongstad
9008724b50 check-flagged-apis: add new CLI to verify @FlaggedApi APIs
Add a new CLI to verify that the build artifacts contain the right set
of @FlaggedApi APIs, based on the value of the corresponding aconfig
flag.

This CLI will act as an end-to-end test of Soong and metalava.

This CL only adds the project scaffolding; later CLs will add the
implementation.

Bug: 334870672
Test: m check-flagged-apis && check-flagged-apis
Change-Id: Ib00653f2a549217da2b0058867c711f35efd5760
2024-04-16 10:32:17 +02:00
Linus Tufvesson
984b069ce2 Use flag for min supported target sdk
Test: Build and flash
Test: adb shell getprop ro.build.version.min_supported_target_sdk
Bug: 297603927
Change-Id: I3a2bcad6b001364a2cf35cad1cac7f69185169d0
2024-04-16 08:08:49 +00:00
Hsin-Yi Chen
ea9f51d6f5 Define a make target for all APEX dumps
The SDK finalization process will create APEX ABI dumps from this
target.

Test: make findlsdumps_APEX check-abi-dump-list
Bug: 333532038
Change-Id: I68d83616ef58aac2618e405a87b1909167b08d43
2024-04-16 15:23:40 +08:00
yangbill
c3f2c7038c Add dependencies for module which define LOCAL_SOONG_INSTALL_PAIRS
The original behvaior will not install related files define in
LOCAL_SOONG_INSTALL_PAIRS due to there's no dependency information in
make, this CL parse the string from each LOCAL_SOONG_INSTALL_PAIRS after
':' as dependencies.

Bug: 333974089
Test: apply aosp/3041672 ; m hyph-lic

Change-Id: I79050e99c3e63f58cfd32db270c909a76bd96801
2024-04-16 04:50:50 +00:00
Inseob Kim
f2b6a44b06 Merge "Revert "Disable build-time debugfs restrictions on GSI builds"" into main 2024-04-16 03:53:37 +00:00
Treehugger Robot
8b1e29ae7e Merge "Make output of MakeVbmeta consistent" into main 2024-04-15 22:27:36 +00:00
Ted Bauer
8f9ca8075f Merge "aconfig: switch read api lib to cc_library" into main 2024-04-15 17:22:00 +00:00
Kelvin Zhang
1d9b3daad2 Make output of MakeVbmeta consistent
The order of items in `partitions` map is non-deterministic. To make
sure that builds are hermetic, sort the map before use.

Test: th
Bug: 332550989
Change-Id: I76c7037ef9f03904899339813819fcf985a7c893
2024-04-15 09:45:03 -07:00
Treehugger Robot
a40c6380a1 Merge "Revert^2 "Expose RELEASE_AVF_SUPPORT_CUSTOM_VM_WITH_PARAVIRTUALIZED_DEVICES"" into main 2024-04-15 12:06:31 +00:00
Inseob Kim
7c30e914e0 Revert "Disable build-time debugfs restrictions on GSI builds"
This reverts commit 2a2a97afba.

Reason for revert: use compat cil instead

Bug: 330671086
Test: build
Change-Id: I3f34156e228a3a52d4e05882dbb3c62320bb61a6
2024-04-15 15:32:35 +09:00
Treehugger Robot
15783cdcff Merge "Revert "16k: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on aosp_x86_64"" into main 2024-04-15 05:39:12 +00:00
Treehugger Robot
4f9f7219b7 Merge "Revert "16k: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on aosp_arm64"" into main 2024-04-15 05:39:12 +00:00
Treehugger Robot
5fcfa8a3c2 Merge "Revert^3 "16k: core: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO by default on Android V targets"" into main 2024-04-15 05:39:12 +00:00
Daniel Zheng
28ca2fc0a0 Merge "Revert "Turn on V3 cow"" into main 2024-04-13 06:50:00 +00:00
Daniel Zheng
fa5bfb9d79 Revert "Turn on V3 cow"
Revert submission 2973761-cow_v3_make

Reason for revert: b/333966507

Reverted changes: /q/submissionid:2973761-cow_v3_make

Change-Id: I4f8c19a1d78b9af882e7df51fb2fc0172c0282c3
2024-04-12 22:24:42 +00:00
Vilas Bhat
15e3467d6d Revert^3 "16k: core: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO by default on Android V targets"
This reverts commit 35839ec1a3.

Reason for revert: CI breakages for 2 targets. Please refer to bug for more details

Bug: 334152807
Change-Id: I0e38583cd3fa57afef432406374ec8d4ddc57e72
2024-04-12 22:20:40 +00:00
Vilas Bhat
25aa14531f Revert "16k: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on aosp_x86_64"
This reverts commit 1c4c94d784.

Reason for revert: CI breakages for 2 targets. Please refer to bug for more details

Bug: 334152807
Change-Id: I76853ccfd8a41f99670a7b7513f358f076f9b271
2024-04-12 22:15:59 +00:00
Vilas Bhat
e0d18ffe70 Revert "16k: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on aosp_arm64"
This reverts commit 39dcf40403.

Reason for revert: CI breakages for 2 targets. Please refer to bug for more details

Bug: 334152807
Change-Id: Ic2fc942b1769aed03553fc305ac283666eb9e3f5
2024-04-12 22:14:42 +00:00
Dennis Shen
36661d4cd0 aconfig: switch read api lib to cc_library
Bug: b/321077378
Test: atest -c
Change-Id: I8d64396797b01a8ce2f4bee165596701940836e4
2024-04-12 21:21:44 +00:00
Treehugger Robot
112a57658b Merge "16k: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on aosp_arm64" into main 2024-04-12 19:37:04 +00:00
Treehugger Robot
ef19738567 Merge "16k: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO only on Android V targets" into main 2024-04-12 19:01:06 +00:00
Dennis Shen
7d642b10df Merge "aconfig: add write api cpp test to presubmit" into main 2024-04-12 18:26:55 +00:00
Vilas Bhat
39dcf40403 16k: Enable PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO on aosp_arm64
`PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO` overrides
`TARGET_NO_BIONIC_PAGE_SIZE_MACRO` value in the build system. Enabling
TARGET_NO_BIONIC_PAGE_SIZE_MACRO implies those targets no longer rely
on the `PAGE_SIZE` bionic macro. Page size would be queried at runtime
using getpagesize() / sysconf(_SC_PAGE_SIZE).

Bug: 310232825
Test: lunch <target> && get_build_var TARGET_NO_BIONIC_PAGE_SIZE_MACRO
Change-Id: I37133cb2419566e9616a2cde640372352178980f
2024-04-12 17:50:39 +00:00
Dennis Shen
65610a10d5 Merge "aconfig: update flag info query api" into main 2024-04-12 17:41:36 +00:00
Vilas Bhat
d3123d4f62 16k: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO only on Android V targets
This updates the VSR_VENDOR_API_LEVEL for which
TARGET_NO_BIONIC_PAGE_SIZE_MACRO is set to false from < 34 to < 35

Bug: 310232825
Test: lunch <target> && get_build_var TARGET_NO_BIONIC_PAGE_SIZE_MACRO
Change-Id: Ib6b8ba94fe6b2c8b7bbf31fb56e07bd97eb79fc2
2024-04-12 17:23:57 +00:00
Vilas Bhat
eaf40e1675 Merge "Revert^2 "16k: core: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO by default on Android V targets"" into main 2024-04-12 17:18:48 +00:00