Merge "Introduce b into envsetup.sh." am: ec11d42e3b am: eb5ad873b7 am: 75941f99fe am: 88ca5a67c0

Original change: https://android-review.googlesource.com/c/platform/build/+/1710468

Change-Id: Id5a27695451f071d853cfa24b44a9becdb2e24c7
This commit is contained in:
Jingwen Chen 2021-05-20 02:46:29 +00:00 committed by Automerger Merge Worker
commit 14e8d673a1

View file

@ -1691,10 +1691,19 @@ function _trigger_build()
if T="$(gettop)"; then if T="$(gettop)"; then
_wrap_build "$T/build/soong/soong_ui.bash" --build-mode --${bc} --dir="$(pwd)" "$@" _wrap_build "$T/build/soong/soong_ui.bash" --build-mode --${bc} --dir="$(pwd)" "$@"
else else
echo "Couldn't locate the top of the tree. Try setting TOP." >&2 echo "Couldn't locate the top of the tree. Try setting TOP."
return 1
fi fi
) )
function b()
(
# Generate BUILD, bzl files into the synthetic Bazel workspace (out/soong/workspace).
m nothing GENERATE_BAZEL_FILES=true || return 1
# Then, run Bazel using the synthetic workspace as the --package_path.
"$(gettop)/tools/bazel" "$@" --config=bp2build
)
function m() function m()
( (
_trigger_build "all-modules" "$@" _trigger_build "all-modules" "$@"