commit | 403658f9cbcf4db08b0064e9f3eb6b984327d236 | [log] [tgz] |
---|---|---|
author | Mårten Kongstad <amhk@google.com> | Wed Jun 14 09:51:56 2023 +0200 |
committer | Mårten Kongstad <amhk@google.com> | Mon Jun 19 16:04:32 2023 +0200 |
tree | 79277fc2b106004d42a282f03bc1e659433df3f4 | |
parent | a99ac90eb5e9893be95dfd0e7bf3314557e9d968 [diff] |
aconfig: use proto struct directly Remove the hand-crafted wrappers around the structures auto-generated from protos/aconfig.proto, and use the auto-generated structs directly intead. This gets rid of a lot of manual repetition, and its inherent risk. Also unify how individual fields read from text proto are verified (e.g. is the flag.name field a valid identifier). Also change the intermediate cache format from JSON to binary protobuf. The concept of a 'cache' as an intermediate internal format to represent parsed input stays. The command line interface still refers to caches. At the moment a cache file is identical to a parsed_file protbuf, and the code exploits this internally. A couple of points regarding the auto-generated structs: - Vectors are named in the singular (e.g. parsed_flags.parsed_flag is a Vec<ProtoParsedFlag>) because this improves ergonomics for all devs working with aconfig input files - The auto-generated structs have fields that are of type Option<T> and convenience methods (named the same as the fields) to access T Test: atest aconfig.test aconfig.test.java Bug: 283910447 Change-Id: I512820cc4bc6c543dea9f6a4356f863120a10be3
This is the Makefile-based portion of the Android Build System.
For documentation on how to run a build, see Usage.txt
For a list of behavioral changes useful for Android.mk writers see Changes.md
For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.
This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.