| # Copyright lowRISC contributors. |
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| # SPDX-License-Identifier: Apache-2.0 |
| # Use Bazel to query for the location of targets instead of searching |
| REPO_TOP=$(git rev-parse --show-toplevel) |
| printf "Usage: $0 [-v] <bazel target label> [bazel options...]" |
| while getopts 'v' flag; do |
| if [ $verbose == 'false' ]; |
| REL_PATH=$(${REPO_TOP}/bazelisk.sh outquery "$@" 2>$REDIR) |
| REPO_EXECROOT=$(${REPO_TOP}/bazelisk.sh info --show_make_env execution_root) |
| echo "${REPO_EXECROOT}/${REL_PATH}" |