mirror of
https://github.com/Droid-VM/crosvm.git
synced 2026-11-17 06:58:03 +00:00
Building the `crosvm` module on a device tree pulls the com.android.virt APEX with it -- microdroid kernel, initrd, pvmfw, bootloader -- because that module is apex_available for it. None of that is wanted here: this binary is launched by an ordinary Android app, not by virtualizationservice, and the APEX build is by far the slowest part of an otherwise small compile. crosvm_device_only_bin is the same source with the same features and rustlibs, minus apex_available. It shares src/main.rs through a filegroup rather than a copy, so the two cannot drift. Two soong details are worth knowing before touching this. The filegroup and the phony live at the top of the root Android.bp, ahead of the first rust_ module, because cargo_embargo regenerates everything from the first rust_ module down and would otherwise drop them. And the binary is installable:false -- an installable rust_binary in this tree drags a bionic install rule behind it -- which means it gets no phony of its own and `m crosvm_device_only_bin` fails with "unknown target"; the explicit phony is what makes `m crosvm_device_only` work. |
History
|
|
|---|---|---|
| .. | ||
| Android.bp | ||