Commit graph

123 commits

Author SHA1 Message Date
Cole Faust
efe843b319 Merge "Simplify aconfig_declarations_group" into main am: 791733fad4 am: 4ec136ab8f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3133934

Change-Id: I48d0ddb19e76ab9118b661549c305d8f345111ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 20:35:13 +00:00
Cole Faust
779d41cf7c Simplify aconfig_declarations_group
Some of the getters were unused, which means that all the fields
could be made into local variables.

Test: m nothing --no-skip-soong-tests
Change-Id: Iea38ed7f9da952803f54194c0c5a8fda9b6007f5
2024-06-14 11:17:48 -07:00
Zi Wang
58b583f64d Merge "Use OutputFilesProvider on aconfig_declarations_group" into main am: 8f3fd0a049 am: 2d92d1dc3a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3126616

Change-Id: I3b4ae3de38159917a3940ffb60894268fb511d55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 00:27:57 +00:00
mrziwang
937f35f464 Use OutputFilesProvider on aconfig_declarations_group
In the context of incremental soong, the output files
inter-module-communication will be through OutputFilesProvider.
The OutputFileProducer interface will be deprecated.

This CL also removes the unused field "intermediatePath" from
build_flag_declarations and aconfig_declarations

Test: CI
Bug: 339477385
Change-Id: I8417db7ca6ece50b3ecd807fc3b6356aa52b18e0
2024-06-13 15:03:16 -07:00
Treehugger Robot
bdf8b61b90 Merge "Build build_flags.json in soong" into main am: 89341ed9ad am: fe69b391f2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3011253

Change-Id: Ie0e1c55ec6bced378ad3b1692a73a31223ee7133
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-29 22:30:10 +00:00
Treehugger Robot
89341ed9ad Merge "Build build_flags.json in soong" into main 2024-05-29 00:18:16 +00:00
Dennis Shen
a6efbada57 Merge "Soong: remove obsolete proto lib from unit test" into main am: 54082dd8fe am: efc53b111d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3097659

Change-Id: I7dd91be78499f7192f7ed2cf1f531f25f6dfa04f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-23 16:35:43 +00:00
Dennis Shen
6a7ffb3ec0 Soong: remove obsolete proto lib from unit test
Bug: b/321077378
Test: m and avd
Change-Id: Ib121da201e0be38d1acd82de1487f6cfba9e696c
2024-05-23 11:43:42 +00:00
Justin Yun
5f53869dfe Build build_flags.json in soong
Define release_flags_json module type to install build_flags.json in
'etc'. release_flags_json reads the json files generated from the
soong release-config command.

Bug: 324996303
Test: build and see if the files are installed
Change-Id: I8cdcb7c61dd75cc54e4912d2ed7d1687f424151c
2024-05-23 14:58:08 +09:00
Treehugger Robot
a2f9e9a882 Merge changes I6b1d6dcd,I97eb864e,I155c26b1 into main am: 1ab18fc547 am: 1415729eea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3092860

Change-Id: I91e4f3a5637983bacb121ed36f3745fdac36b965
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-22 00:37:41 +00:00
LaMont Jones
c6aef16816 Add build_flag_declarations module
And generate build-flags/build_flags.{pb,textproto} files

Bug: 328495189
Test: manual,TH
Change-Id: I97eb864e2d84bc606fef7e9077554894338edaa0
2024-05-21 15:35:22 -07:00
Oriol Prieto Gascó
a874e94bab Merge "Make container mandatory in aconfig_declarations." into main 2024-05-03 14:09:48 +00:00
Ted Bauer
27eee7045a Read from original flag
Test: m
Change-Id: I72f0a3fc765a00fc57a293f39cefa1f6c3aac519
Bug: 328444881
Ignore-AOSP-First: reconciling with aosp/3067403
2024-05-01 18:00:34 +00:00
Treehugger Robot
be43654c4e Merge "Add new storage deps in forced read-only mode" into main am: 82e91a602b am: e6dae288ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3068633

Change-Id: I48a7f64b42bd8be4cd55617703dd264e9dc6afb4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 15:51:17 +00:00
Ted Bauer
c3031c5c7b Add new storage deps in forced read-only mode
Bug: 328444881
Test: m
Change-Id: I26d5d5c96414a62f2f83eb4d725e69cea61214da
2024-05-01 13:54:40 +00:00
Ted Bauer
205f08b7ad Drive instrumentation with build flag for C/C++ am: 10fff94e2e am: c19dfaf9d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3065602

Change-Id: I04dc519f2bb9a3304071ac5430ead38405a2326d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-29 22:03:21 +00:00
Ted Bauer
10fff94e2e Drive instrumentation with build flag for C/C++
Bug: 328444881
Test: m
Change-Id: I20c92c61f855adb772d6aa173e85a6d8092460d7
2024-04-29 19:53:43 +00:00
Ted Bauer
29219f8b47 Merge "Switch libbase to shared" into main am: 84835f48ea am: ef05b58774
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3065162

Change-Id: I2971e86181f43d0bbfeaf105ce141c4bfda37fea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-29 17:28:30 +00:00
Ted Bauer
84835f48ea Merge "Switch libbase to shared" into main 2024-04-29 16:47:45 +00:00
Ted Bauer
6c69edfbf1 Switch libbase to shared
Test: m
Bug: 328444881
Change-Id: Ia232859bcc6591e26eb244d8c3f15336204a460e
2024-04-29 15:05:57 +00:00
Jeff DeCew
3479eb04bf Merge "Ensure aconfig generated CustomFeatureFlags is renamed by JarJar" into main am: 996c883b65 am: 28f8546ea0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3058302

Change-Id: I0b24529f8fabd4a206b1504283856907c47d32c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-26 19:27:41 +00:00
Jeff DeCew
996c883b65 Merge "Ensure aconfig generated CustomFeatureFlags is renamed by JarJar" into main 2024-04-26 18:39:43 +00:00
Ted Bauer
f08e6ff54c Merge "Switch to static deps" into main am: 8e4060abc5 am: 60462974fa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3062942

Change-Id: Ie69b7b4b5d1ed79d1c327a3765dfa94815da7cb8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-26 15:47:44 +00:00
Ted Bauer
1e96f8c622 Switch to static deps
Bug: 328444881
Test: m
Change-Id: I53ad95ca281031ec98d5df66ada0ed69749da312
2024-04-26 13:46:09 +00:00
Yu Liu
315a53c5cb Make container mandatory in aconfig_declarations.
Bug: 330354107
Test: Unit test and CI.

Ignore-AOSP-First: It is easier to detect all the missing ones in internal
master.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e916a2c758d2a95037d1d366e7cd0e10d241d510)
Merged-In: I4ab4271c67a35d0fdcc0b57c27260e29fb7dea56
Change-Id: I4ab4271c67a35d0fdcc0b57c27260e29fb7dea56
2024-04-24 16:41:57 +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
Yu Liu
51b0f1045b Merge "Make container mandatory in aconfig_declarations." into main 2024-04-23 23:54:40 +00:00
Ted Bauer
7a6d4f75d8 Merge "Add aconfig storage API deps to codegened lib" into main am: b39c877ae0 am: e7b8b02428
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3055467

Change-Id: I7e2663716723adf47224445f714a36147a82fe82
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-23 23:27:16 +00:00
Yu Liu
e916a2c758 Make container mandatory in aconfig_declarations.
Bug: 330354107
Test: Unit test and CI.

Ignore-AOSP-First: It is easier to detect all the missing ones in internal
master.

Change-Id: I4ab4271c67a35d0fdcc0b57c27260e29fb7dea56
2024-04-23 21:54:54 +00:00
Ted Bauer
f0f18591a5 Add aconfig storage API deps to codegened lib
Change-Id: I4991c9fccb0a0bab15457883cf20aacb3142c4cf
2024-04-23 18:25:26 +00:00
Jihoon Kang
f4b835ccd9 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main am: 033ffb9533 am: 1628b82c6f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3001319

Change-Id: I81e9d102c17bb5a1caf4400fc9d9513eb2be5c02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-11 18:03:02 +00:00
Jihoon Kang
033ffb9533 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main 2024-04-11 17:37:58 +00:00
Jihoon Kang
79ef24f994 Merge "Revert^2 "Include all_aconfig_declarations in docs dist"" into main am: afacc090e8 am: 4972943ead
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3028264

Change-Id: Ie24926692abf3aec92057fe7cb521fae05007f3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-05 18:35:52 +00:00
Jihoon Kang
afacc090e8 Merge "Revert^2 "Include all_aconfig_declarations in docs dist"" into main 2024-04-05 17:53:22 +00:00
Jihoon Kang
b9ca4d3ffe Revert^2 "Include all_aconfig_declarations in docs dist"
This reverts commit 60d4307605.

Reason for revert: The build target is discussed as safe to be copied to the dist directory

Change-Id: I0e59a826991631ffcd77af97c8f51c8b9002c14e
2024-04-04 17:26:36 +00:00
Dennis Shen
58378c9dbc use build system flag RELEASE_READ_FROM_NEW_STORAGE to drive codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Ignore-AOSP-First: code only needed for git_main, and will be removed once test mission 1 is finished.

Bug: b/332737012
Test: m
Change-Id: Ide3f432321ebd3dce9427e7cb8f2086e24d3cc31
2024-04-03 19:35:25 +00:00
Kiyoung Kim
683d7316cd Merge "Remove VNDK information from Rust, etc, and sysprop tests" into main 2024-04-02 01:14:40 +00:00
Kiyoung Kim
1db4a74a59 Remove VNDK information from Rust, etc, and sysprop tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-etc, soong-rust and soong-sysprop tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: Ie34d23f0facab31078de54682f7cc78d37fcd4be
2024-04-01 15:53:58 +09:00
Ted Bauer
6ef40dbce6 Add logging dependencies to Rust aconfig APIs
Test: go test
Change-Id: I17c098f6b83c442554e49b6b802f11c97f94ec76
2024-03-29 14:05:05 +00:00
Jihoon Kang
3921f0b356 Collect aconfig_declarations of the dependent java_aconfig_library modules
droidstubs module require aconfig_declarations modules to be specified
when the module depends on the java_aconfig_library module in order to
generate the "exportable" stubs. This adds burden to the droidstubs or
java_sdk_library module owners, as module should specify both the
java_aconfig_library and aconfig_declarations modules to genreate the
"exportable" stubs, although the necessary information from the
aconfig_declarations module can be provided from the
java_aconfig_library modules.

In order to resolve such burden, this change enables the intermediate
cache files from the associated aconfig_declarations module of a
java_aconfig_library module to be propagated to its reverse dependencies
without having the specify the aconfig_declarations modules in the
droidstubs or java_sdk_library modules definitions.

This does not mean that the intermediate cache files of every transitive
dependencies of the java_sdk_library or the droidstubs will be passed to
aconfig to retrieve the state of the aconfig flags.

Specifically, only the java_aconfig_library modules or the java_library
modules that have static dependency on java_aconfig_library modules that
are passed to droidstubs via `libs` or `srcs` (using
":module_name{.tag}" syntax) will provide the intermediate cache files
to generate the "exportable" stubs. For java_sdk_library, all modules
listed as `libs`, `static_libs`, `stub_only_libs`, and `apiScope.libs`
are passed as `libs` and all modules listed as `api_srcs` and `srcs` are
passed as `srcs` to the droidstubs modules dynamically generated in
java_sdk_library module per api scope, thus these properties will be
affected.

Note that the test is being added in the apex package. This is because
trying to register the codegen package build components in the java
package leads to circular dependency between the codegen and the java
package, as codegen package imports the java package.

Test: m nothing --no-skip-soong-tests
Bug: 329284345
Change-Id: I7953ab64776f6947808321ce8a3598154501bcfe
2024-03-29 01:11:32 +00:00
Ted Bauer
02d475c3d8 Add storage API as dependency to Rust codegen
Test: m
Bug: 328444881
Change-Id: Id1ef9276adb9f9b990a05b910937e96ab0a5ac50
2024-03-28 18:38:32 +00:00
Yu Liu
eeff222655 Pass "--container" to aconfig create-cache
Bug: 328823994
Test: unit tests and manual tests locally.

Ignore-AOSP-First: It is easier to detect all the mismatch in internal
master.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b75ed0f2d8c4d13924573fd065c9706475aac17b)
Merged-In: I096877015b78786639376b279a9be5d07594d92e
Change-Id: I096877015b78786639376b279a9be5d07594d92e
2024-03-19 23:07:34 +00:00
LaMont Jones
60d4307605 Revert "Include all_aconfig_declarations in docs dist"
This reverts commit 90c2af97ed.

Reason for revert: Includes too many flags.  The on-device copy of aconfig declarations must be **only** those that are used by code on the device.  `all_aconfig_declarations` is every aconfig flag in the source tree, and cannot be placed on the device.

Change-Id: Id7ac61c0805825b4ca27fffe84a48f95e3c682b2
2024-03-11 20:35:14 +00:00
Mårten Kongstad
90c2af97ed Include all_aconfig_declarations in docs dist
Include all_aconfig_declarations in the docs dist directory, in both
binary protobuf (for machine consumption) and text protobuf (for human
consumption) format.

Bug: 324281288
Test: m docs dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto
Change-Id: I5756b913aeb44ee4f3f9ab64ae5038fc64557b5f
2024-03-11 14:07:21 +01:00
Yu Liu
67a28425a7 Validate aconfig libs are built with the correct modes.
Bug: 323071835
Test: Unit tests and manual tests.
Change-Id: I32de90826c7c8bb4d8495608e959d554820ab9a2
2024-03-07 18:51:16 +00:00
Zhi Dou
e11319d466 enable exportable check
If a library is built to mode exported, the flag declaration has to be
set with exportable true. The reason for this requirement is only flags
in the exportabel declarations will be repackaged. To prevent forgetting
adding this attribute, this exportable attribute is required to be set
for all exportable declarations.

Test: m
Bug: 310504781
Change-Id: I3ddafe0b212dabe86aa5000b1b76c7c412acc93c
2024-03-05 22:21:03 +00:00
Mårten Kongstad
c61353222c Include all_aconfig_declarations in droid dist
Include all_aconfig_declarations in the droid dist directory
(identically to how it is already included in the sdk dist).

For local builds, `printflags` is still the recommended way to read
all_aconfig_declarations; the dist-ed files are intended as a way to
inspect remote builds, such as CI builds.

Bug: 324281288
Test: lunch aosp_oriole-trunk-eng && m droid dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto
Change-Id: Ic29d69ab5014593a3f9213f8a5b55e0569922cc9
2024-02-23 09:22:56 +01:00
Yu Liu
864fd2f1f5 Merge "Support aconfig stoage files for apex." into main 2024-02-21 17:42:58 +00:00
Mårten Kongstad
2a1adcc63a Include all_aconfig_declarations in sdk dist
Include all_aconfig_declarations in the sdk dist directory, in both
binary protobuf (for machine consumption) and text protobuf (for human
consumption) format.

Bug: 324281288
Test: m sdk dist && test -e out/dist/flags.pb && test -e out/dist/flags.textproto
Change-Id: Icfb4841c3fe6478ddc233ef6d092ca700a8acb20
2024-02-20 12:51:25 +01:00
Yu Liu
bba555ee31 Support aconfig stoage files for apex.
Bug: 323071835
Test: unit tests and manual build test.
Change-Id: I4a1a05b3afdf88058a970040b3f176f36c5c8037
2024-02-17 00:36:42 +00:00