首页 > 解决方案 > 配置环境

问题描述

bazel build --config cxx20 --config opts ...

我想默认为--config cxx20 --config opts. 但是我无法更改 .bazelrc 因为其他用户使用不同的配置。是否有用于配置的环境变量BAZEL_CXXOPTS

export BAZEL_???="--config cxx20 --config opts"

标签: bazel

解决方案


您还可以考虑在 shell 中使用别名,例如

alias bb='bazel build --config cxx20 --config opts'

推荐阅读