Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhao94 committed Jun 8, 2022
1 parent 147bb55 commit f6ae91a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/codebase_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export CRIS_CODE_DIRS="$(sed 's/^[[:space:]]*//' <<< "
" | grep '[^[:space:]]')"

function bazel_common_all () {
echo "$CR_CCACHE_CC_DIR:$PATH"
# Need to set PATH instead of CC because Bazel does not
# like '/'s in the CC value.
PATH="$CR_CCACHE_CC_DIR:$PATH" bazel "$@" '//...'
}
2 changes: 2 additions & 0 deletions scripts/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if which ccache >/dev/null 2>&1 && ([ -d 'run' ] && [ -w 'run' ] || [ -w '.' ]);
export CR_CCACHE_CC_DIR="$( realpath -e "run/toolchain")"

for compiler in $CC $CXX; do
# Bazel may dereference the ccache symlink, so we use wrapper scripts instead.
# See https://github.com/bazelbuild/rules_cc/issues/130
cat << EOF > "$CR_CCACHE_CC_DIR/$compiler"
#!/bin/bash
$(which ccache) $(which $compiler) \$@
Expand Down

0 comments on commit f6ae91a

Please sign in to comment.