Skip to content

Commit

Permalink
Use and suggest repo_env for compiler choice
Browse files Browse the repository at this point in the history
Setting CC only for repository rules suffices to influence the compiler
chosen by @local_config_cc, but is more economic with respect to caching
than setting it for all actions. CXX is not used by Bazel.
  • Loading branch information
fmeum committed Aug 16, 2021
1 parent 57e245f commit 5eba34e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ It is best to create command shorthands for the fuzzing configurations you will

```
# Force the use of Clang for C++ builds.
build --action_env=CC=clang
build --action_env=CXX=clang++
build --repo_env=CC=clang
# Define the --config=asan-libfuzzer configuration.
build:asan-libfuzzer --@rules_fuzzing//fuzzing:cc_engine=@rules_fuzzing//fuzzing/engines:libfuzzer
Expand Down Expand Up @@ -168,8 +167,7 @@ To use Jazzer, it is convenient to also define a `.bazelrc` configuration, simil

```
# Force the use of Clang for all builds (Jazzer requires at least Clang 9).
build --action_env=CC=clang
build --action_env=CXX=clang++
build --repo_env=CC=clang
# Define --config=jazzer for Jazzer without sanitizer (Java only).
build:jazzer --@rules_fuzzing//fuzzing:java_engine=@rules_fuzzing//fuzzing/engines:jazzer
Expand Down

0 comments on commit 5eba34e

Please sign in to comment.