commit | 277e5dc36e0a8771ab4c508afdbfe442ffd4cbee | [log] [tgz] |
---|---|---|
author | Dennis Shen <dzshen@google.com> | Tue Jan 23 18:01:52 2024 +0000 |
committer | Dennis Shen <dzshen@google.com> | Wed Jan 24 02:18:52 2024 +0000 |
tree | 7887fa76db1d8656672d2a7b07834c910907becc | |
parent | 04acb6d25584b7ee42617bf998903bd768b2209b [diff] |
Restructure aconfig repo to be a cargo workspace with many crates Previously, aconfig repo is the root directory of aconfig binary crate, but it also hosts printflags crate inside, and there is no cargo support for printflags binary crate. In addition, with more aconfig development, more crates are being added to this repo. Thus this repo should be configured as a Cargo workspace with multiple crates rather than a single crate. Note the top level Cargo.toml file specifies the crates this workspace carries: (1) aconfig_protos: the proto library crate that will be used by many other crates such as aconfig binary crate and printflags binary crate (2) aconfig: the aconfig binary crate (3) printflags: the printflags binary crate (1) aconfig_protos crate setup: Inside aconfig_protos dir we set up the aconfig_protos crate, the previously src/proto.rs is now aconfig_protos/src/lib.rs, the build.rs is carried over to this crate. (2) aconfig binary crate setup: Notice its Cargo.toml file claims package dependency on aconfig_protos crate. It no longer carries proto related module and build.rs file. (3) printflags binary crate setup: Similary, notice that in its Cargo.toml file, it claims package dependency on aconfig_protos crate. With this setup, we can Cargo build/test each crate individually when inside a specific crate dir. But we can also run Cargo build/test at repo root level, which will build/test all the crates in this workplace. This is the structuring cl. The next cl is to move storage modules into its own library crate. This storage file library crate will be used by both aconfig binary crate as well as flag read library crate (to be created as another new crate here). Bug: b/321984352 Test: top and individual crate dir level Cargo build/test, m each individual targets Change-Id: I75833f4997f7ee554ff6c1557df9ac87f62b2732 Merged-In: I75833f4997f7ee554ff6c1557df9ac87f62b2732
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.