chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
89 stars 15 forks source link

Find and insert the resource dir when the compiler was Clang #445

Closed danakj closed 10 months ago

danakj commented 10 months ago

If the compiler used to compile the source file from compile_commmands.json was Clang, then Subdoc (a Clang tool itself) needs to know where the "resource dir" is that Clang would have used, since Clang goes through the resource dir to find system headers.

To do this, we execute the Clang compiler with -print-resource-dir and return the directory given by it. Then we append this to the Subdoc execution of ClangTool with -resource-dir.