Generate bindings for C++ standard library
This cl implements a new bindings_for_toolchain_headers rule that generates bindings for the C++ standard library headers. The list of headers that we consider public is located under devtools/rust/cc_interop/rs_bindings_from_cc/BUILD. I'll expand it in a followup cl.
Currently the grte headers are considered to be non-public headers that are part of the C++ standard library. We'll create a separate target for them in a followup cl.
We will not be generating bindings for the clang builtin headers.
PiperOrigin-RevId: 426237240
diff --git a/rs_bindings_from_cc/importer.cc b/rs_bindings_from_cc/importer.cc
index 6275385..35af0f6 100644
--- a/rs_bindings_from_cc/importer.cc
+++ b/rs_bindings_from_cc/importer.cc
@@ -538,11 +538,7 @@
// consider it a textual header. In that case we go up the include stack
// until we find a header that has an owning target.
- // TODO(b/208377928): We currently don't have a target for the headers in
- // Clang's resource directory, so for the time being we return a fictional
- // "//:virtual_clang_resource_dir_target" for system headers.
- while (source_location.isValid() &&
- !source_manager.isInSystemHeader(source_location)) {
+ while (source_location.isValid()) {
if (source_location.isMacroID()) {
source_location = source_manager.getExpansionLoc(source_location);
}