Add aninja to envsetup.sh

Add an aninja function to envsetup.sh that can run ninja with the
appropriate ninja file for an Android build.  Simplifies running
queries with ninja.  For example:
aninja -t query droid

Test: aninja -t query droid
Change-Id: I7064984d55054cd4350800cfd75bf6aaa1740e9d
This commit is contained in:
Colin Cross 2023-10-24 10:58:46 -07:00
parent 420d7d5878
commit 71319726df

View file

@ -2059,6 +2059,11 @@ function overrideflags() {
(\cd "${T}" && build/make/tools/overrideflags.sh "$@")
}
function aninja() {
local T="$(gettop)"
(\cd "${T}" && prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-${TARGET_PRODUCT}.ninja "$@")
}
validate_current_shell
set_global_paths
source_vendorsetup