Skip to content

Commit

Permalink
Use try-import to load an optional user-specific user.bazelrc
Browse files Browse the repository at this point in the history
This is very useful for setting local configurations such as
extra warnings, --config, etc.

Name `user.bazelrc` like bazel best practices describe it:
https://bazel.build/configure/best-practices#bazelrc-file

Change-Id: If531d682668b4cb2421cfba79848102964634189
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62770
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
  • Loading branch information
hzeller authored and junyer committed Mar 4, 2024
1 parent 8695a63 commit dbf15a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ build:windows --cxxopt=/std:c++14

# Print test logs for failed tests.
test --test_output=errors

# https://bazel.build/configure/best-practices#bazelrc-file
try-import %workspace%/user.bazelrc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
core
obj/
benchlog.*
user.bazelrc

0 comments on commit dbf15a2

Please sign in to comment.