Commit Graph

59 Commits

Author SHA1 Message Date
Liana Kazanova
df1c59a657 Revert "pass read new storage parameter to java codegen"
This reverts commit 9cf2e8e140.

Reason for revert:DroidMonitor - Potential culprit for http://b/369200837 - Verifying through ABTD before submission. 

Change-Id: I635ba732fba40b7c73b5c419ef204fb14e857cb2
2024-09-23 21:54:04 +00:00
Zhi Dou
9cf2e8e140 pass read new storage parameter to java codegen
When RELEASE_READ_FROM_NEW_STORAGE is true, enable reading from new
storage. So that we can ensure nextfood is not impacted.

Test: m and check cf
Bug: 349874828
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c98032785339de11e34ee3d4f94b3ec3ed70d324)
Merged-In: Id12816206a16b17c23e3a53832d268f1600107b3
Change-Id: I95ad9457e6d9c07a5a5b3074045a383f004113a9
2024-09-23 19:29:41 +00:00
Dennis Shen
01efb83420 Treat system_ext as system container
Bug: b/365135457
Test: m
Change-Id: Ic8fd60c0e1045f190b6608931ca1d65a784026f0
2024-09-12 23:31:49 +00:00
Treehugger Robot
05145c8a17 Merge "Cleanup more bazel code" into main am: 51fc67bd20
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3146657

Change-Id: I4c7c226a331b50c9ac38ecba6146dab4fb2d45c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-25 19:40:38 +00:00
Cole Faust
487b144fe0 Cleanup more bazel code
Bug: 315353489
Test: m nothing --no-skip-soong-tests
Change-Id: I6c6b4fcd559f4a45b1a96c70cbb5d6d1a615ccff
2024-06-25 11:02:38 -07:00
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
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
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
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
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
Jihoon Kang
2a43e56b5f Introduce module type aconfig_declarations_group
In order to easily manage aconfig_declarations modules and their
corresponding codegen modules, this change introduces a new module type
`aconfig_declarations_group`. The module enables listing codegen modules
by language, and correctly depend on the desired output files using
appropriate tags.

e.g. for an aconfig_declarations_group module "some_group", the rdeps of
the module can:
- gather all intermediates cache files of the aconfig_declarations with
  ":some_group" tag.
- gather generated srcjar files of the listed java_aconfig_library
  modules with ":some_group{.srcjars}" tag.

Output tag support for cc modules and rust modules will be added in
future changes.

Test: m nothing --no-skip-soong-tests
Bug: 320492079
Change-Id: I93d737577f8d00198ed91048dd6e81ef238193cb
2024-02-14 18:52:31 +00:00
Zi Wang
0e5d16c6f0 Add property Exportable to aconfig_declarations
Only when aconfig_declarations explicitly set this property true,
its flags will be repackaged.

If a java_aconfig_library has mode "exported", its corresponding
aconfig_declarations must have exportable prop set to true.

Test: Added unit tests and CI

Bug: 310504781

Ignore-AOSP-First: this change will be cherry picked to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4527f3010b3fd6f33948a15a9b4fdc944da34f0)
Merged-In: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
Change-Id: Ie9526e3755a6e7d142b377d5dd85a1bc60ffabc5
2024-02-08 06:19:34 +00:00
Joe Onorato
349ae8dd6b Automatically propagate jarjar rules for aconfig libraries
Test: treehugger
Bug: 310504781
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:97c03a6dc659102ff40793759fb3f0f18164a85b)
Merged-In: I639d12ff33175b7bed7e7d0595a40dd9b0d99367
Change-Id: I639d12ff33175b7bed7e7d0595a40dd9b0d99367
2024-02-05 22:46:00 +00:00
LaMont Jones
b509938e4f Propagate AconfigFiles in ModuleBase.
Aconfig file dependencies are module-independent, and properly part of
ModuleBase.

Bug: b/308625757
Test: manual

Change-Id: I38c5907d1671cc69bb198345201316ae781fdc9f
2024-01-24 23:45:12 +00:00
Dennis Shen
c6dc551097 do not include sever_configurable_flags dependency when in
force-read-only-mode

Bug: b/316932568
Test: m --no-skip-soong-tests nothing
Change-Id: I02a7925dd6b5b33107dae1507447f8e7a1991795
2024-01-10 14:07:35 +00:00
Dennis Shen
4e7773d81e Enforce one aconfig_declaration per aconfig package
Bug: b/319121098
Change-Id: Ibe3f1587ed7754f00f464cf385ce51ee9a142412
2024-01-10 01:53:49 +00:00
Kiyoung Kim
6284e0a935 Merge "Generate image variation without version" into main 2024-01-05 04:57:26 +00:00
Kiyoung Kim
b5fdb2e966 Generate image variation without version
Current CC/Rust Image variations are generated with target VNDK version.
However, this is no longer valid if VNDK is deprecated. This change
generates image variation without version ("vendor", "product") if VNDK
is deprecated.

Bug: 316829758
Test: m nothing --no-skip-soong-tests passed
Test: aosp_cf_x86_64_phone build succeeded
Change-Id: I2387ed8a2632bfd9462621f882a947695ae1653d
2024-01-05 11:15:23 +09:00
Zhi Dou
70e2124c88 Add "force-read-only" mode to xx_aconfig_library build rules
Test: added unit tests and CI
Bug: 317115655
Change-Id: Ia72159ffe072f9b4997f0d4d55a7b3db5356f5ed
2023-12-21 03:41:02 +00:00
LaMont Jones
4daed5a026 Merge "move CollectDependencyAconfigFiles to android" into main 2023-12-19 23:07:50 +00:00