Skip to content

Commit

Permalink
Add external_include_paths feature
Browse files Browse the repository at this point in the history
Mirrors this upstream feature bazelbuild/bazel#12009
  • Loading branch information
keith committed May 6, 2024
1 parent 1806ae9 commit 792d284
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions crosstool/cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,32 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
],
)

external_include_paths_feature = feature(
name = "external_include_paths",
flag_sets = [
flag_set(
actions = [
ACTION_NAMES.preprocess_assemble,
ACTION_NAMES.linkstamp_compile,
ACTION_NAMES.c_compile,
ACTION_NAMES.cpp_compile,
ACTION_NAMES.cpp_header_parsing,
ACTION_NAMES.cpp_module_compile,
ACTION_NAMES.clif_match,
ACTION_NAMES.objc_compile,
ACTION_NAMES.objcpp_compile,
],
flag_groups = [
flag_group(
flags = ["-isystem", "%{external_include_paths}"],
iterate_over = "external_include_paths",
expand_if_available = "external_include_paths",
),
],
),
],
)

strip_debug_symbols_feature = feature(
name = "strip_debug_symbols",
flag_sets = [
Expand Down Expand Up @@ -2665,6 +2691,7 @@ please file an issue at https://github.com/bazelbuild/apple_support/issues/new
treat_warnings_as_errors_feature,
no_warn_duplicate_libraries_feature,
layering_check_feature,
external_include_paths_feature,
]

if (ctx.attr.cpu == "darwin_x86_64" or
Expand Down

0 comments on commit 792d284

Please sign in to comment.