BUILD 1.0 KB

123456789101112131415161718192021222324
  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. load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
  5. # Flag controlling whether the target config is used for the `carbon_*` Bazel
  6. # rules. The default is to use the exec config as that is more correct in cases
  7. # where the target config is not compatible with the exec (cross compiling), and
  8. # for library users of Carbon likely the most efficient as it will provide an
  9. # optimized toolchain.
  10. #
  11. # However, for building the Carbon project itself, this will roughly double the
  12. # build cost by forcing a build in both target and exec config. As a consequence
  13. # we disable the flag in the `.bazelrc` of the project for its builds.
  14. bool_flag(
  15. name = "use_target_config_carbon_rules",
  16. build_setting_default = False,
  17. )
  18. config_setting(
  19. name = "use_target_config_carbon_rules_config",
  20. flag_values = {":use_target_config_carbon_rules": "True"},
  21. )