Commit graph

85322 commits

Author SHA1 Message Date
Treehugger Robot
9726e805b3 Merge "aconfig: fix broken auto-generated Rust code" into main 2023-07-20 12:32:57 +00:00
Mårten Kongstad
2d5309cab1 aconfig: fix broken auto-generated Rust code
Fix syntax error in auto-generated Rust code that prevents the code from
compiling.

For reference, the error was:

---- 8< ----
error: expected `where`, `{`, `(`, or `;` after struct name, found keyword `impl`
 --> .../src/lib.rs:6:1
  |
6 | impl FlagProvider {
  | ^^^^ expected `where`, `{`, `(`, or `;` after struct name
---- >8 ----

Bug: 292052163
Test: manual: create sample based on auto-generated Rust lib
Change-Id: I4c029c0ee16ea3849e7bbe381717a10402c9cb81
2023-07-20 11:33:19 +02:00
Mårten Kongstad
ea4981407b aconfig: add 'verbose' dump format
Add a new --format=verbose dump output format. This is identical to the
default 'text' format but includes the source files from which the flag
declaration and values were read, and is intended to help debug why a
flag isn't set to some expected value.

Bug: 283910447
Test: atest aconfig.test
Test: printflags --format=verbose # manually inspect output
Change-Id: I03a1c8d940e7a0c6f91e986c5bafa4aa6cd1125a
2023-07-20 11:07:35 +02:00
Mårten Kongstad
3fa2f078ff aconfig: improve the 'text' dump format
Standardize the flag values as '<permission> + <state>', e.g.
'READ_ONLY + ENABLED'.

Bug: 283910447
Test: atest aconfig.test
Test: printflags # manually inspect output
Change-Id: I60f74196816327613bd8165a688f8b36da5bdac7
2023-07-20 09:35:05 +02:00
Mårten Kongstad
9338007cff aconfig: remove the 'debug' dump format
The --format=debug dump output format is largely superseded by the
textproto format now that aconfig doesn't use hand-written wrappers
around the auto-generated proto struct anymore. Remove the format to
reduce the risk of code rot.

Bug: 283910447
Test: atest aconfig.test
Change-Id: I6700fc4eafd3fa3a63952109c0105d34c7ffd98b
2023-07-20 09:25:56 +02:00
Mårten Kongstad
9c3502d4b4 Merge "Aconfig: sort the parsed flag order in create-cache" into main 2023-07-20 06:35:02 +00:00
Zhi Dou
92cf0ec232 Aconfig: sort the parsed flag order in create-cache
This change will sorted the parsed flags from the declarations. Without
this change the code will expect the passed in declarations sorted.
After this change the code will still guarantee the parsed flags in the
cache is sorted, but it won't expect the passed in declarations are
sorted

Test: atest aconfig.test
Bug: 291926035
Change-Id: I5f0637fe770003224b128591890e04277bc09345
2023-07-20 02:32:00 +00:00
Daniel Zheng
0ee11559f9 Merge "Moving vendor_boot out of BOARD_AVB_ENABLE block" into main 2023-07-19 15:57:45 +00:00
Kangping Dong
693afdca74 Merge "add service-threadnetwork to system_server jars" into main 2023-07-19 09:40:46 +00:00
Treehugger Robot
3ca44b286e Merge "Add a new variable for deprecating VNDK" into main 2023-07-19 04:44:51 +00:00
Timothy Yiu
e97b271350 Merge "Conditionally remove DSU for wearable targets" into main 2023-07-19 04:04:21 +00:00
tyiu
741227c432 Conditionally remove DSU for wearable targets
Bug: 289629075
Test: m + Treehugger
Change-Id: Idcf862ee728d81b37ee6a37eb4001969102e250f
2023-07-18 23:59:13 +00:00
Dennis Shen
dca368be45 Merge "aconfig: Rust codegen 2nd iteration" into main 2023-07-18 20:14:51 +00:00
Dennis Shen
3cfbcf5384 aconfig: Rust codegen 2nd iteration
Introduce rust codegen 2nd iteration with unit test support. The design
is described in detail in the design doc (go/aconfig_rust_codegen). The general idea is to generate
different code with the same signature for production and test build
targets, just like java/c/cpp codegen.

We will have a FlagProvider struct that has flag methods implementation.
This flag provider instance can then be used in injection pattern. In
additon, we also generate top level functions that wraps around flag
provider call so it can be used in static function style.

Things to be decided later:

should we just generate one set of code, and use cfg! as compile
time marco to compile the right code for the right targets.

Bug: b/279483360
Test: atest aconfig.test
Change-Id: Ic75cedbd0d27b5242014c3ac7fc80692d2ab4589
2023-07-18 20:14:46 +00:00
Dennis Shen
01332169f3 Merge "Minor c/c++ codegen update" into main 2023-07-17 12:58:23 +00:00
Sebastian Pickl
21c04ea58c Merge "Revert "Minify the sdk targets"" into main 2023-07-17 10:11:57 +00:00
Menghan Li
bda69f5991 Revert "Minify the sdk targets"
This reverts commit 7a114c5313.

Reason for revert: DroidMonitor-triggered revert due to breakage, bug b/291353860 verified with go/abtd https://android-build.googleplex.com/builds/abtd/run/L17500000961999253 by menghanli@

Change-Id: Iaaf37f780e71ef6f0eb745b3c06c1c5f47a8e03b
Bug: 291353860
2023-07-17 10:05:27 +00:00
Treehugger Robot
f1f3e38b64 Merge "Disable copying images for target_files.zip" into main 2023-07-16 23:44:25 +00:00
Justin Yun
22ce9479be Disable copying images for target_files.zip
For the OTA build, target_files.zip requires setting fixed timestamp
for images. However, it caused regression on 'adb sync'.
Restoring image build process for target_files.zip instead of copying
them from the PRODUCT_OUT, only the images in target_files.zip set the
fixed timestamp.
By setting COPY_IMAGES_FOR_TARGET_FILES_ZIP flag, we still may copy
the images for target_files.zip for future use.

Bug: 287534409
Test: m; flashall; adb sync
Test: m dist; flash images from target_files.zip and check the timestamp
Change-Id: I4135eb721c33581f191621847e6595833263d707
2023-07-17 07:46:48 +09:00
Cole Faust
7137d5d46f Merge "Minify the sdk targets" into main 2023-07-14 20:42:18 +00:00
Dennis Shen
5c2421394c Minor c/c++ codegen update
1, Moved "#include <string>" from exported header to test flag provider
header file.

2, For production target and read only flags, the generated c
api should just return default value instead of calling into c++ api

3, Remove using namespace server_configurable_flags from header, instead
of just having the namespace to be spelled out in each api call. Having
using namespace xxx in header is not a c++ best practice.

4, Replace #ifdef #def #endif with #pragma once

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I3e55a7b14301f3de419795467f33e2dc889d371e
2023-07-14 16:09:35 +00:00
Dennis Shen
21380611d4 Merge "aconfig: update c/c++ codegen" into main 2023-07-14 13:37:01 +00:00
Jiakai Zhang
de5df72bcd Add core-icu4j and consrypt to the ART boot image for testing.
Bug: 290583827
Test: art/tools/buildbot-build.sh --host
Test: m test-art-host-gtest
Test: m build-art-target-golem
Test: m build-art-host-golem
Change-Id: I8d0069b51484deb193350332ff911a89f2c4ee56
2023-07-14 12:48:38 +01:00
Jiakai Zhang
f2cc1324c1 Merge changes from topics "art-boot-image-jars", "configured-jar-location-overrides" into main
* changes:
  Add a Make variable to determine ART boot image jars for testing.
  Add a Make variable that overrides configured jar locations.
2023-07-14 11:47:59 +00:00
Dennis Shen
17a08eeca0 aconfig: update c/c++ codegen
Two major changes to c/c++ codegen

(1) explicit setter for each flag instead of a generic flag setter
void override_flag(std::string name, bool val) is replaced with

void <flag name>(bool val) for each flag name

This has several advantages:
  (a) generated code is more c++ idomatic
  (b) no longer need to create flag name string constants
  (c) any typo in the code is caught early in the build time

(2) remove flag setter and flag override reset methods/functions when
generating code targets for production. If developers want to update
their main function to take command line arg for flag overrides, they
can use compile time macros to decide if the flag override code should
be included.

Bug: b/279483801
Test: atest aconfig.test
Change-Id: I6141f7f979b32fe0426154d578edeb997ae5ff7c
2023-07-14 11:40:49 +00:00
Shaju Mathew
9c777ce8a5 Merge "Use command instead of which to locate/run adb" into main 2023-07-14 02:21:28 +00:00
Kiyoung Kim
f019601670 Add a new variable for deprecating VNDK
Add a new flag variable for deprecating VNDK. This variable should be
passed to Soong, so it can change behavior based on the flag.

Bug: 290157355
Test: build succeeded with KEEP_VNDK=false
Change-Id: I3a9d1041411ad24ff42f76506a8f929e364b868d
2023-07-14 01:18:19 +00:00
Cole Faust
7a114c5313 Minify the sdk targets
Previously, the "sdk" target was a minimal lunch target that only
included enough to build the sdk. But the "sdk_<arch>" targets
redirected to the "sdk_phone_<arch>" targets, which are much bigger
and capable of building a whole emulator.

Building the sdk on products that can build a whole device complicates
the rest of the build system (for example, it starts enforcing dexpropt
works)

Bug: 290798660
Test: Presubmits
Change-Id: I0ec5110318c43a7feee0b88edbed1cab0b590a47
2023-07-13 16:40:30 -07:00
Saagar Jha
11f188c09a Use command instead of which to locate/run adb
If adb is not found on PATH, which will silently fail and evaluate to
the empty string. This will cause the remaining arguments to be
interpreted as a command to run in the shell, which is generally
undesirable. (Consider, for example, "adb reboot" -> "reboot".)

Bug: 24473359
Test: Just run adb before lunch so it's not on PATH

Change-Id: I6b20722add6c67d1d2627f963dc66095502ab816
Signed-off-by: Saagar Jha <saagarjha@google.com>
2023-07-13 23:36:29 +00:00
LaMont Jones
e75c063d1f Merge changes from topic "mod-info-foreach" into main
* changes:
  Reduce spaces in module-info.json
  use KATI_foreach_sep in module-info.json rules
2023-07-13 19:36:02 +00:00
Treehugger Robot
442e8719b9 Merge "Update BUILD_ID" into main 2023-07-13 17:02:31 +00:00
Dennis Shen
afd8b2d75b Merge "aconfig: add c codegen" into main 2023-07-13 13:55:10 +00:00
Dennis Shen
7321f4f6f1 aconfig: add c codegen
c codegen can be done at the same time with cpp codegen, the idea is to
create a c compatible header that defines the flag apis, including flag
override apis for test. then in the corresponding cpp file, the
implementation simply calls into cpp api.

c header supports static method interface, and unit test override, but
it does not support injection pattern compared to cpp header

Bug: b/279483801
Test: atest aconfig.test
Change-Id: Ie62b76d6524e443de5d3c2f9000f7f66623ab571
2023-07-13 13:55:06 +00:00
Jiakai Zhang
7bdb2b3c32 Add a Make variable to determine ART boot image jars for testing.
Bug: 290583827
Test: m nothing
Change-Id: Ibd0dd99593e4efb357e674c6a89804ea9cd47a84
2023-07-13 14:24:18 +01:00
Jiakai Zhang
17c6af46df Add a Make variable that overrides configured jar locations.
Bug: 290583827
Test: m nothing
Change-Id: I9a23d6a033d50d2a8c5d9e8dd79d00033efa1f53
2023-07-13 14:24:16 +01:00
Kangping Dong
a1a7046533 add service-threadnetwork to system_server jars
Instructions: go/mainline-java-lib#classpath-configuration

Bug: 262683651
Test: run `m -j16`
Change-Id: I3f2a8603669b16a7e3a7aeb06ac850add0df8c5d
2023-07-13 06:04:58 +00:00
Jooyung Han
b51bc1c77e Merge changes I16be0dcb,I4656d43d,I52b831df into main
* changes:
  Do not install required modules from order-only deps
  Install vintf_fragments/init_rc along with targets
  Install vintf_fragments even when they are shared
2023-07-13 01:29:47 +00:00
Neha Jain
3505f2b3a4 Merge "Revert "Enable CFI for the whole Bluetooth repo and not just system"" into main 2023-07-13 00:24:18 +00:00
LaMont Jones
3a9ce1d6ea Reduce spaces in module-info.json
Test: manual, presubmit
Change-Id: I79b94206d636b3ac1f4e88eca514057e4613cbfa
2023-07-12 23:17:05 +00:00
LaMont Jones
edc62e8ffe use KATI_foreach_sep in module-info.json rules
Test: manual, presubmit
Change-Id: I0be472cd5c35eeb8f44c7b9184d961d975f6137a
2023-07-12 23:17:05 +00:00
Neha Jain
9926178660 Revert "Enable CFI for the whole Bluetooth repo and not just system"
This reverts commit d759b3517a.

Reason for revert: b/289779264

Change-Id: If7bdba6a420f2a310ad86b7b3b44eba5111c5d69
2023-07-12 23:16:25 +00:00
Amith Dsouza
cab8fc9658 Update BUILD_ID
Master branch has been renamed to main, the build id needs to reflect
this change.

Ignore-AOSP-First: Merge conflict resolutions
Bug: 290400015
Change-Id: I77884da7587fecae362f9c82fee9f45ff9878cc0
Merged-In: Ieb8b84d340f2308255ad2f23e5ac23635fb680de
Merged-In: Ife1860b73bc83d32a61817d5a9fe25c2deb1e37d
Merged-In: I132433a625848a210603a2e0ad102c12435b3ba4
Merged-In: I740ef3225c4c291ef7313d3ff1fe5d78389497f5
2023-07-12 23:12:35 +00:00
Tiffany Yang
b8306086d3 Merge "Make common signature system property definitions optional" into main 2023-07-12 18:35:37 +00:00
Treehugger Robot
51ec7172a8 Merge "Updating build/config setup to refresh adb path name after a rebuild." into main 2023-07-12 18:03:51 +00:00
Treehugger Robot
12e453bb55 Merge "Remove metalava --no-banner argument" into main 2023-07-12 17:08:42 +00:00
Bill Yi
7a3ff6b30c Merge "Merge TQ3A.230705.001 to aosp-main - DO NOT MERGE" into main 2023-07-12 13:38:41 +00:00
Mårten Kongstad
beb2bfded0 Remove metalava --no-banner argument
metalava no longer prints an ASCII banner, and has removed its
--no-banner argument. Update all call sites accordingly.

Test: presubmit
Bug: 286023667
Change-Id: I0159cad6571c62d672da5aeb3ff422abb97c7ac9
2023-07-12 14:07:22 +02:00
Roman Kiryanov
76d1e380a6 Merge "(reland2) Remove emulator dependencies on non emulator targets (2)" into main 2023-07-12 02:51:56 +00:00
Cole Faust
f5350e965b Merge "Remove BOARD_BPT* variables and the bpt parition table image" into main 2023-07-12 01:26:51 +00:00
Cole Faust
4f3dc8759f Remove BOARD_BPT* variables and the bpt parition table image
These variables appear to never be set.

Test: Presubmits
Change-Id: If4b89376f73204ad5780dff421f1216da255c3eb
2023-07-11 16:58:06 -07:00