Use try-import to load an optional user-specific user.bazelrc

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>
This commit is contained in:
Henner Zeller authored and Paul Wankadia committed 2024-03-04 13:57:44 +00:00
1 parent 8695a63867
commit dbf15a205c
2 files changed
+4

No files matched your search

+3
View File
@@ -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
View File
@@ -3,3 +3,4 @@
core
obj/
benchlog.*
user.bazelrc