cc_toolchain_actions.bzl 805 B

123456789101112131415161718192021
  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. """Useful sets of actions for defining `cc_toolchain_config` features."""
  5. load("@rules_cc//cc:action_names.bzl", "ACTION_NAMES", "ACTION_NAME_GROUPS")
  6. # all_c_compile_actions includes actions that compile C or assembly.
  7. all_c_compile_actions = [
  8. x
  9. for x in ACTION_NAME_GROUPS.all_cc_compile_actions
  10. if x not in ACTION_NAME_GROUPS.all_cpp_compile_actions
  11. ]
  12. # preprocessor_compile_actions includes actions that run the preprocessor.
  13. preprocessor_compile_actions = [
  14. x
  15. for x in ACTION_NAME_GROUPS.all_cc_compile_actions
  16. if x not in [ACTION_NAMES.assemble, ACTION_NAMES.cpp_module_codegen]
  17. ]