Merge "Introduce b into envsetup.sh." am: ec11d42e3b am: eb5ad873b7

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

Change-Id: Id07d59d4b85e7955ade1ae5bed3e53ce7534d8ef
This commit is contained in:
Jingwen Chen
2021-05-19 23:34:18 +00:00
committed by Automerger Merge Worker

View File

@@ -1687,10 +1687,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" "$@"