diff options
author | Keith Smiley <keithbsmiley@gmail.com> | 2024-05-06 15:15:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-06 22:15:18 +0000 |
commit | ede3957d0fa7102ccf5319fc9e48ea86e1f3ad32 (patch) | |
tree | ecff235d164259e0f54ea271dbad5d84e6482d06 | |
parent | 1806ae96c08790f60eeb45279a408ebc2568b91a (diff) | |
download | bazelbuild-apple_support-upstream-master.tar.gz |
Add external_include_paths feature (#327)upstream-master
Mirrors this upstream feature
https://github.com/bazelbuild/bazel/issues/12009
-rw-r--r-- | crosstool/cc_toolchain_config.bzl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/crosstool/cc_toolchain_config.bzl b/crosstool/cc_toolchain_config.bzl index 11c6256..e274cf6 100644 --- a/crosstool/cc_toolchain_config.bzl +++ b/crosstool/cc_toolchain_config.bzl @@ -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 = [ @@ -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 |