1# Constants for cc_* rules.
2# To use, load the constants struct:
3#
4#   load("//build/bazel/rules:cc_constants.bzl", "constants")
5# Supported hdr extensions in Soong. Keep this consistent with hdrExts in build/soong/cc/snapshot_utils.go
6_HDR_EXTS = ["h", "hh", "hpp", "hxx", "h++", "inl", "inc", "ipp", "h.generic"]
7_SRC_EXTS = ["c", "cc", "cpp", "S"]
8_ALL_EXTS = _SRC_EXTS + _HDR_EXTS
9_HDR_EXTS_WITH_DOT = ["." + ext for ext in _HDR_EXTS]
10_SRC_EXTS_WITH_DOT = ["." + ext for ext in _SRC_EXTS]
11_ALL_EXTS_WITH_DOT = ["." + ext for ext in _ALL_EXTS]
12
13# These are root-relative.
14_GLOBAL_INCLUDE_DIRS_COPTS_ONLY_USED_FOR_SOONG_COMPATIBILITY_DO_NOT_ADD_MORE = [
15    "/",
16]
17constants = struct(
18    hdr_exts = _HDR_EXTS,
19    src_exts = _SRC_EXTS,
20    all_exts = _ALL_EXTS,
21    hdr_dot_exts = _HDR_EXTS_WITH_DOT,
22    src_dot_exts = _SRC_EXTS_WITH_DOT,
23    all_dot_exts = _ALL_EXTS_WITH_DOT,
24)
25