Commit graph

100 commits

Author SHA1 Message Date
Oriol Prieto Gascó
a874e94bab Merge "Make container mandatory in aconfig_declarations." into main 2024-05-03 14:09:48 +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
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
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
996c883b65 Merge "Ensure aconfig generated CustomFeatureFlags is renamed by JarJar" into main 2024-04-26 18:39:43 +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
Ted Bauer
f0f18591a5 Add aconfig storage API deps to codegened lib
Change-Id: I4991c9fccb0a0bab15457883cf20aacb3142c4cf
2024-04-23 18:25:26 +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
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
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
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
Yu Liu
748ade2f85 Add dedup flag to aconfig dump-cache calls.
Bug: None
Test: CI
Change-Id: I34a73576a7a7ea43178895049a0f7dbcd9e329bc
2024-02-08 19:11:39 +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
LaMont Jones
15b031e10e Merge changes Iaf6d45a4,Ic56e8ef3,I11f0a0b5 into main
* changes:
  Propagate aconfig providers for more modules.
  move SetAconfigFileMkEntries to android
  aconfig: harden dependency collection
2024-01-10 18:54:30 +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
LaMont Jones
acae2d7656 move SetAconfigFileMkEntries to android
This will need to be called by some modules handled in android.

Bug: 308625757
Test: manual
Change-Id: Ic56e8ef3a453c59866aab6d39a21108cf8536b56
2024-01-10 14:03:29 +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
f80405a5e5 Merge "Add "force-read-only" mode to xx_aconfig_library build rules" into main 2024-01-03 23:00:33 +00:00
Mårten Kongstad
c479c026f1 Change aconfig dump to aconfig dump-cache
Update the calls to dump aconfig caches; the new canonical name is
`dump-cache`, though `dump` is still an accepted alias (for now).

Bug: N/A
Test: m all_aconfig_declarations && printflags
Change-Id: I9f82d31666ced6bbd0f195f1422590547114e0f0
2023-12-21 16:49:11 +01:00
Mårten Kongstad
26d2c67339 Merge "Replace aconfig dump --format=bool with explicit format string" into main 2023-12-21 07:03:38 +00: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
Victor Chang
a9d3293bf4 Merge "Avoid circular dependency for the aconfig usage in libcore" into main 2023-12-19 20:39:03 +00:00
LaMont Jones
aa005ae080 move CollectDependencyAconfigFiles to android
This needs to be called by some modules in android.

Bug: 308625757
Test: manual
Change-Id: I389fcfd88a3f4bd85a9218fdd4dd66d8a239bb67
2023-12-19 19:34:00 +00:00
Mårten Kongstad
b3fa1cfca9 Replace aconfig dump --format=bool with explicit format string
aconfig will remove its support for format aliases in an attempt to make
future maintenance easier. Update soong accordingly.

Bug: 317044915
Test: m
Change-Id: I20157ea8c7b441d4e416967d29fc7768c917e688
2023-12-19 16:55:32 +01:00
Victor Chang
bf0175ee6a Avoid circular dependency for the aconfig usage in libcore
Bug: 316554963
Test: m droid
Change-Id: I6f45e585b8b656ef7ce1d51bbde0a44898198907
2023-12-19 14:22:07 +00:00
Mårten Kongstad
0a0ea26c60 Fix broken sdk build (/bin/sh: 1: [[: not found)
The CL aosp/2878135 introduced a new shell command to be executed as
part of `m sdk dist` builds. The new command incorrectly used bash
syntax for conditionals, i.e. `if [[ ... ]]` (double [[]]) instead of
the POSIX compliant `if [ ... ]` (single []).

This broke the sdk build on systems where /bin/sh is not a symlink to
/bin/bash:

  /bin/sh: 1: [[: not found
  error: lstat out/soong/.intermediates/exported_java_aconfig_library.jar.tmp: file does not exist

Fix the breakage by using POSIX shell syntax instead.

Bug: 316933458
Bug: 311151343
Test: m sdk dist
Change-Id: I7de53261674a8f54c4ecacf0e27aecbafcfa4048
2023-12-19 08:20:51 +01:00
Yu Liu
4c27146e4c Merge "Properly package aconfig files for product and system_ext partitions" into main 2023-12-19 00:40:03 +00:00
Yu Liu
22e32f1b0b Properly package aconfig files for product and system_ext partitions
Bug: 311173471
Test: Unit tests
Change-Id: Iac60695beb6529139965e4bb24024df6ce278fb2
2023-12-18 14:44:34 -08:00