From 71319726dff61ff36ac56ed6cc48dd8e3fa7ebac Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 24 Oct 2023 10:58:46 -0700 Subject: [PATCH] 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 --- envsetup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/envsetup.sh b/envsetup.sh index af6695fb94..e448bd3cc8 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -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