Commit Graph

96881 Commits

Author SHA1 Message Date
Luca Farsi
b31ae07678 Merge "Stream build process output" into main am: ad64a4d296
Original change: https://android-review.googlesource.com/c/platform/build/+/3014894

Change-Id: I1a9ef3ccc26f92db9cba1be7fb1c1d4fb7737a51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 19:23:08 +00:00
Luca Farsi
ad64a4d296 Merge "Stream build process output" into main 2024-04-18 19:03:40 +00:00
Luca Farsi
db136447a6 Stream build process output
Ensure that output and errors from the underlying build command are
streamed for real-time build progress updates and debugging.

This change strips out all code that is currently unecessary and adds
tests for the remaining functionality.

Test: atest --host build_test_suites_local_test build_test_suites_test
Bug: 330365727
Change-Id: I7ef98d6654fe1435cf67c15e2c516a0967e03a75
2024-04-18 19:02:50 +00:00
Daniel Zheng
270130a025 add build property for compression_factor
Compression factor, as discussed, should be a configurable build
property. This flag here will control that. From initial analysis, it
looks like 64k is a good default. go/variable-block-vabc-perf

Bug: 313962438
Test: th
Change-Id: I2bddede22655e36446e734ac1917be560b1a3a1b
2024-04-18 11:22:26 -07:00
Treehugger Robot
91c54cf72f Merge "aflags: read protos from all containers" into main am: ac407794b9
Original change: https://android-review.googlesource.com/c/platform/build/+/3001064

Change-Id: I85bc3e1b9385f2fa20e241fcb192b85927523057
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 17:37:32 +00:00
Daniel Zheng
2e9b1534f6 Merge "Revert^2 "Turn on V3 cow"" into main am: 78986f598f
Original change: https://android-review.googlesource.com/c/platform/build/+/3044532

Change-Id: I4bdfb9fd46645fafc1f6b2b2ecc257fcf7dfe0c7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 17:37:17 +00:00
Treehugger Robot
ac407794b9 Merge "aflags: read protos from all containers" into main 2024-04-18 17:23:59 +00:00
Daniel Zheng
78986f598f Merge "Revert^2 "Turn on V3 cow"" into main 2024-04-18 16:54:15 +00:00
Ted Bauer
206d44aff5 aflags: read protos from all containers
Create one library for reading protos from all containers, instead of
having numerous libraries perform the same logic. For Java, we will
create a similar library reusing the same
partition_aconfig_flags_paths.txt.

Bug: 324436145
Test: adb shell aflags list # Confirm that various containers appear
Change-Id: I924e281a50f9a609e1c07c03267eebe3dce52752
2024-04-18 14:38:41 +00:00
Mårten Kongstad
76460bd770 check-flagged-apis: add script to run tool on actual data
Add a script to make it easier to check-flagged-apis for the public APIs
and the three flavours of @FlaggedApi.

Bug: 334870672
Test: lunch sdk-next-eng && source check-flagged-apis.sh
Change-Id: I8b5e2642ade84560c5c61ae49d8c0dcdedb841ca
2024-04-18 16:13:52 +02:00
Michael Merg
75d934f261 Set enforce SOONG_GEN_COMPDB=1 when running soong for ide_query
Change-Id: I125a82fb07285bf53e9a6d591dee69d85ee82050
2024-04-18 12:06:31 +00:00
Mårten Kongstad
7cc217459a check-flagged-apis: simplify unit test dependencies
Replace the current unit test runner DeviceJUnit4ClassRunner with JUnit4
and replace the (larger) dependency tradefed with the (smaller)
dependency junit.

This has no impact other than minimizing the unit test static_libs.

Bug: 334870672
Test: atest --host check-flagged-apis-test
Change-Id: I0520ab0feeea5ea2ed15905136ba2647f86162cb
2024-04-18 10:25:33 +02:00
Jim Tang
b9cc101bca Deprecate USE_PREBUILT_SDK_TOOLS_IN_PLACE
USE_PREBUILT_SDK_TOOLS_IN_PLACE is not set anywhere else after
aosp/3043552 lands.

Bug: 122333025
Bug: 332464939
Test: m
Change-Id: I55490cdc0a7036263876ecbb322cc5b4af8d1959
2024-04-18 14:12:15 +08:00
Inseob Kim
d4503ddf8c Merge "Build dirty-image-objects in Soong" into main am: 45c6fd0c17
Original change: https://android-review.googlesource.com/c/platform/build/+/3046352

Change-Id: I92b07b084b16572b5f0934f255ffb4512ca98ed4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 02:06:31 +00:00
Inseob Kim
112961652b Build etc/hosts with Soong
Bug: 335369205
Test: build
Change-Id: I4c56b343cd6624ba3d6bdfb5f70e9c9520dcfe2f
2024-04-18 10:45:23 +09:00
Inseob Kim
45c6fd0c17 Merge "Build dirty-image-objects in Soong" into main 2024-04-18 01:43:00 +00:00
Zhuoyao Zhang
550f96c034 Merge "Add a facility to log tool invocations" into main am: 4ab55dd760
Original change: https://android-review.googlesource.com/c/platform/build/+/3014895

Change-Id: I97ff561efe3ea53c896b234e56708ee4202a95a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 00:59:49 +00:00
Zhuoyao Zhang
4ab55dd760 Merge "Add a facility to log tool invocations" into main 2024-04-18 00:37:28 +00:00
Zhuoyao Zhang
cc44d2e70e Add a facility to log tool invocations
Add a function to log the invocation of tools run from the Android
build environment. This enables analyzing and optimizing developer
flows.

Note that there are no tools currently leveraging the logging
facility. Logging is also disabled by default and not configured to
use any particular logger.

Test: atest run_tool_with_logging_test
bug: 331638854

Change-Id: I001ba3c6c30b3ffc95d0fdb30ea7178a991c680f
2024-04-17 22:41:58 +00:00
Vilas Bhat
306edf5cd6 Merge "16k: build: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO by default on Android V targets" into main am: 185a3fc892
Original change: https://android-review.googlesource.com/c/platform/build/+/3042692

Change-Id: Ib760b055d3f05c0a99032e420187734d947af924
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 20:52:10 +00:00
Vilas Bhat
185a3fc892 Merge "16k: build: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO by default on Android V targets" into main 2024-04-17 20:27:37 +00:00
Dennis Shen
c74aecc828 Merge "aconfig: add support for local override" into main am: e6b424ad4a
Original change: https://android-review.googlesource.com/c/platform/build/+/3044414

Change-Id: Id6463eb5f6f768de6acb6356b1ed469f53c59553
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 19:31:19 +00:00
Dennis Shen
e6b424ad4a Merge "aconfig: add support for local override" into main 2024-04-17 19:07:56 +00:00
Treehugger Robot
0b27706be2 Merge "check-flagged-apis: create list of @FlaggedApi errors" into main am: fde34c3b65
Original change: https://android-review.googlesource.com/c/platform/build/+/3042361

Change-Id: Ic5c7957c599580627e483ed829763f8796f9e58c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 16:04:06 +00:00
Treehugger Robot
fde34c3b65 Merge "check-flagged-apis: create list of @FlaggedApi errors" into main 2024-04-17 15:44:39 +00:00
Mårten Kongstad
64fffb1e55 Merge "check-flagged-apis: parse API versions XML" into main am: 7978682841
Original change: https://android-review.googlesource.com/c/platform/build/+/3042360

Change-Id: I2a0b3dc98c248dc5f3eb345a78a1e1e6fcf28255
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 14:47:34 +00:00
Treehugger Robot
4b75d8fbcb Merge changes I397b32ae,Ic244b896,I5ccf2a64 into main am: e24a1e4ddc
Original change: https://android-review.googlesource.com/c/platform/build/+/3042359

Change-Id: Ic12c5d4d224eea13002ef2639bbfc634395d996f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 14:47:18 +00:00
Mårten Kongstad
7978682841 Merge "check-flagged-apis: parse API versions XML" into main 2024-04-17 14:41:32 +00:00
Mårten Kongstad
9238a3ab76 check-flagged-apis: create list of @FlaggedApi errors
Teach check-flagged-apis to cross-check the data from its three input
sources. This allows the tool to detect

  - @FlaggedApi references to non-existent flags
  - @FlaggedApi APIs present in the build artifacts even though the flag
    is disabled
  - @FlaggedApi APIs not present in the build artifacts even though the
    flag is enabled

By passing in different sources, the tool can detect these errors for
any of the API surfaces (public, @SystemApi(MODULE_LIBRARIES), etc).

Note: the tool assumes that a disabled flag means that the @FlaggedApi
should not be present in the build output. This is currently true, but
won't be once metalava starts reverting @FlaggedApis to their previous
SDK snapshot.

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: I790234865f831af7d45895def14d1d6740365622
2024-04-17 16:40:03 +02: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
Dennis Shen
9f236037a2 aconfig: add support for local override
1, add a new field in storage metadata proto, for each container, there
is a local override file.

2, update write api to expose the api to map a writable file given the
specific path. the cannonical api will require a storage metadata proto,
and then find the right file path and map it.

3, minor update to make the proto lib cc_library instead of
cc_library_static

Bug: b/312444587
Test: atest -c
Change-Id: Iaf0aff44c1ca3ad4bffc5e06bb99bb276b9069c5
2024-04-17 12:25:11 +00:00
Treehugger Robot
c1483546bb Merge "Add dependencies for module which define LOCAL_SOONG_INSTALL_PAIRS" into main am: 9194b690b1
Original change: https://android-review.googlesource.com/c/platform/build/+/3039064

Change-Id: I475977e2c0b76f1c815916fb9018f7c6918072cd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 09:58:40 +00: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
f1cdb5e191 Merge "check-flagged-apis: add Flag value class" into main am: 7b986ab345
Original change: https://android-review.googlesource.com/c/platform/build/+/3042357

Change-Id: I62acd2ec0c9f05d75ce925edec4fd190c23d0604
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 09:32:22 +00:00
Treehugger Robot
93c8f51704 Merge "check-flagged-apis: add Symbol value class" into main am: 1dbe48454d
Original change: https://android-review.googlesource.com/c/platform/build/+/3042356

Change-Id: Ic3671e092bd32f07dbdfd287cb22efda9e7157e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 09:32:08 +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
Inseob Kim
c3531ebb4b Build dirty-image-objects in Soong
Also dirty-image-objects-phone is removed as it's really never been
used.

Bug: 335369205
Test: build
Change-Id: Ib3eab3dc4c30aaa99b90310903bcc8a86a0f3480
2024-04-17 16:26:04 +09:00
Hsin-Yi Chen
32b9c7b918 Merge changes I35b644fe,Iaec03bd3 into main am: 804f4eecb5
Original change: https://android-review.googlesource.com/c/platform/build/+/3046154

Change-Id: Ic73c450406c56d8b24ec2522c057f97c7ab0a352
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 06:30:37 +00: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
25393a4955 Merge "check-flagged-apis: add support for command line options" into main am: 4feb33fefc
Original change: https://android-review.googlesource.com/c/platform/build/+/3042355

Change-Id: Ibab18edc6f9009c4749bcc7fa855a5425bd16928
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 06:04:18 +00:00
Mårten Kongstad
44f92d4b0b Merge "check-flagged-apis: add new CLI to verify @FlaggedApi APIs" into main am: e2ec38c51b
Original change: https://android-review.googlesource.com/c/platform/build/+/3042354

Change-Id: I8e805961af651576825c5cc53f1c6cb967bb7880
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-17 06:03:56 +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