Add docs for skip_virtual_includes (#920) Closes #920 COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/920 from keith:ks/add-docs-for-skip_virtual_includes 0e834a4b430dc19aac0990a39f83174dfa5d05c3 PiperOrigin-RevId: 994315342 Change-Id: Iab7ea501f9c35ad434a11cec1ff31c73ce566222
diff --git a/docs/features.md b/docs/features.md index b12569d..ef453cc 100644 --- a/docs/features.md +++ b/docs/features.md
@@ -538,6 +538,23 @@ This feature must be enabled by default if desired. +### `skip_virtual_includes` + +A marker feature that avoids creating `_virtual_includes` symlinks when +headers only need a `strip_include_prefix` (without an +`include_prefix`). Instead, `rules_cc` adds the stripped directory to +the include paths directly and uses the original headers. This reduces +path lengths and can help avoid long path issues on Windows. + +The only downside of this feature is that if you disable sandboxing +non-declared headers can be included that are in the same directory as +the one being added to the include path. This would still be caught by +[`layering_check`](#layering_check) if enabled. + +See also [`shorten_virtual_includes`](#shorten_virtual_includes). + +This feature must be enabled if desired. + ### `static_link_cpp_runtimes` A marker feature used by `rules_cc` to determine if the toolchain