.bazelrc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. build --crosstool_top=@bazel_cc_toolchain
  5. build --host_crosstool_top=@bazel_cc_toolchain
  6. # Allow the toolchain to configure itself differently in the host build from
  7. # the target build. Even when the host and target platforms are ostensibly the
  8. # same (and use identical toolchains), it is beneficial to be able to configure
  9. # the specific toolchain features enabled for the target separately from the
  10. # host. For example, sanitizers make sense for the target significantly more
  11. # than for the host.
  12. #
  13. # Bazel bug tracking undoing the default here:
  14. # https://github.com/bazelbuild/bazel/issues/13315
  15. build --incompatible_dont_enable_host_nonhost_crosstool_features=false
  16. # Completely disable Bazel's automatic stripping of debug information. Removing
  17. # that information causes unhelpful backtraces from unittest failures and other
  18. # crashes. Optimized builds already avoid using debug information by default.
  19. build --strip=never
  20. build:force_local_bootstrap --repo_env=CARBON_FORCE_LOCAL_BOOTSTRAP_BUILD=1
  21. # Configuration for enabling Address Sanitizer. Note that this is enabled by
  22. # default for fastbuild. The config is provided to enable ASan even in
  23. # optimized or other build configurations.
  24. build:asan --features=asan
  25. # Configuration for enabling LibFuzzer (along with ASan).
  26. build:fuzzer --features=fuzzer
  27. # Always allow tests to symbolize themselves with whatever `llvm-symbolize` is
  28. # in the users environment.
  29. test --test_env=ASAN_SYMBOLIZER_PATH
  30. # Force actions to have a UTF-8 language encoding.
  31. # TODO: Need to investigate what this should be on Windows, but at least for
  32. # Linux and macOS this seems strictly better than the Bazel default of just
  33. # `en_US`.
  34. build --action_env=LANG=en_US.UTF-8