BUILD 1.1 KB

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