Skip to content

Commit

Permalink
add feature on windows toolchain with right tag (#18654)
Browse files Browse the repository at this point in the history
  • Loading branch information
lripoche authored Jul 4, 2023
1 parent e0dcb24 commit ce5c491
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tools/cpp/windows_cc_toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,32 @@ def _impl(ctx):
],
)

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 = ["/external:I", "%{external_include_paths}"],
iterate_over = "external_include_paths",
expand_if_available = "external_include_paths",
),
],
),
],
)

linkstamps_feature = feature(
name = "linkstamps",
flag_sets = [
Expand Down Expand Up @@ -1071,6 +1097,7 @@ def _impl(ctx):
msvc_compile_env_feature,
msvc_link_env_feature,
include_paths_feature,
external_include_paths_feature,
preprocessor_defines_feature,
parse_showincludes_feature,
generate_pdb_file_feature,
Expand Down

0 comments on commit ce5c491

Please sign in to comment.