Skip to content

Commit ede3957

Browse files
authored
Add external_include_paths feature (#327)
Mirrors this upstream feature bazelbuild/bazel#12009
1 parent 1806ae9 commit ede3957

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

crosstool/cc_toolchain_config.bzl

+27
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,32 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
918918
],
919919
)
920920

921+
external_include_paths_feature = feature(
922+
name = "external_include_paths",
923+
flag_sets = [
924+
flag_set(
925+
actions = [
926+
ACTION_NAMES.preprocess_assemble,
927+
ACTION_NAMES.linkstamp_compile,
928+
ACTION_NAMES.c_compile,
929+
ACTION_NAMES.cpp_compile,
930+
ACTION_NAMES.cpp_header_parsing,
931+
ACTION_NAMES.cpp_module_compile,
932+
ACTION_NAMES.clif_match,
933+
ACTION_NAMES.objc_compile,
934+
ACTION_NAMES.objcpp_compile,
935+
],
936+
flag_groups = [
937+
flag_group(
938+
flags = ["-isystem", "%{external_include_paths}"],
939+
iterate_over = "external_include_paths",
940+
expand_if_available = "external_include_paths",
941+
),
942+
],
943+
),
944+
],
945+
)
946+
921947
strip_debug_symbols_feature = feature(
922948
name = "strip_debug_symbols",
923949
flag_sets = [
@@ -2665,6 +2691,7 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
26652691
treat_warnings_as_errors_feature,
26662692
no_warn_duplicate_libraries_feature,
26672693
layering_check_feature,
2694+
external_include_paths_feature,
26682695
]
26692696

26702697
if (ctx.attr.cpu == "darwin_x86_64" or

0 commit comments

Comments
 (0)