Merge "Show bazel help for b
called without args." am: bb53fe394b
am: 541174975b
am: 561e16a0a5
am: bbdac0940c
Original change: https://android-review.googlesource.com/c/platform/build/+/1737501 Change-Id: I5defbca387879b6913cd04b993a500630dfb7678
This commit is contained in:
@@ -1700,12 +1700,19 @@ function _trigger_build()
|
|||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Convenience entry point (like m) to use Bazel in AOSP.
|
||||||
function b()
|
function b()
|
||||||
(
|
(
|
||||||
# Generate BUILD, bzl files into the synthetic Bazel workspace (out/soong/workspace).
|
# Generate BUILD, bzl files into the synthetic Bazel workspace (out/soong/workspace).
|
||||||
m nothing GENERATE_BAZEL_FILES=true || return 1
|
m nothing GENERATE_BAZEL_FILES=true || return 1
|
||||||
# Then, run Bazel using the synthetic workspace as the --package_path.
|
# Then, run Bazel using the synthetic workspace as the --package_path.
|
||||||
"$(gettop)/tools/bazel" "$@" --config=bp2build
|
if [[ -z "$@" ]]; then
|
||||||
|
# If there are no args, show help.
|
||||||
|
"$(gettop)/tools/bazel" help
|
||||||
|
else
|
||||||
|
# Else, always run with the bp2build configuration, which sets Bazel's package path to the synthetic workspace.
|
||||||
|
"$(gettop)/tools/bazel" "$@" --config=bp2build
|
||||||
|
fi
|
||||||
)
|
)
|
||||||
|
|
||||||
function m()
|
function m()
|
||||||
|
Reference in New Issue
Block a user