Skip to content

Commit ce5c491

Browse files
authored
add feature on windows toolchain with right tag (#18654)
1 parent e0dcb24 commit ce5c491

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tools/cpp/windows_cc_toolchain_config.bzl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,32 @@ def _impl(ctx):
849849
],
850850
)
851851

852+
external_include_paths_feature = feature(
853+
name = "external_include_paths",
854+
flag_sets = [
855+
flag_set(
856+
actions = [
857+
ACTION_NAMES.preprocess_assemble,
858+
ACTION_NAMES.linkstamp_compile,
859+
ACTION_NAMES.c_compile,
860+
ACTION_NAMES.cpp_compile,
861+
ACTION_NAMES.cpp_header_parsing,
862+
ACTION_NAMES.cpp_module_compile,
863+
ACTION_NAMES.clif_match,
864+
ACTION_NAMES.objc_compile,
865+
ACTION_NAMES.objcpp_compile,
866+
],
867+
flag_groups = [
868+
flag_group(
869+
flags = ["/external:I", "%{external_include_paths}"],
870+
iterate_over = "external_include_paths",
871+
expand_if_available = "external_include_paths",
872+
),
873+
],
874+
),
875+
],
876+
)
877+
852878
linkstamps_feature = feature(
853879
name = "linkstamps",
854880
flag_sets = [
@@ -1071,6 +1097,7 @@ def _impl(ctx):
10711097
msvc_compile_env_feature,
10721098
msvc_link_env_feature,
10731099
include_paths_feature,
1100+
external_include_paths_feature,
10741101
preprocessor_defines_feature,
10751102
parse_showincludes_feature,
10761103
generate_pdb_file_feature,

0 commit comments

Comments
 (0)