File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -161,11 +161,37 @@ def _zig_cc_toolchain_config_impl(ctx):
161161 ],
162162 )
163163
164+ # https://github.com/bazelbuild/rules_cc/blob/6fd317b2ae0534a29db7085605b0262849e62f93/cc/private/toolchain/unix_cc_toolchain_config.bzl#L1099
165+ external_include_paths_feature = feature (
166+ name = "external_include_paths" ,
167+ flag_sets = [
168+ flag_set (
169+ actions = compile_and_link_actions + [
170+ # This is the subset of rest_compile_actions that was also
171+ # included in rules_cc's external_include_paths feature.
172+ ACTION_NAMES .preprocess_assemble ,
173+ ACTION_NAMES .linkstamp_compile ,
174+ ACTION_NAMES .cpp_header_parsing ,
175+ ACTION_NAMES .cpp_module_compile ,
176+ ACTION_NAMES .clif_match ,
177+ ],
178+ flag_groups = [
179+ flag_group (
180+ flags = ["-isystem" , "%{external_include_paths}" ],
181+ iterate_over = "external_include_paths" ,
182+ expand_if_available = "external_include_paths" ,
183+ ),
184+ ],
185+ ),
186+ ],
187+ )
188+
164189 features = [
165190 compile_and_link_flags ,
166191 default_linker_flags ,
167192 supports_dynamic_linker ,
168193 strip_debug_symbols_feature ,
194+ external_include_paths_feature ,
169195 ] + _compilation_mode_features (ctx )
170196
171197 artifact_name_patterns = [
You can’t perform that action at this time.
0 commit comments