[clang-scan-deps] [C++] [modules] Calculate resouce_directoty in case the users pass compiler executable by symlink
By default, the clang-scan-deps have problems to find headers from the resource dir like (stddef.h
) if the provided compiler exectuable is a symlink instead of a real compiler. (See https://github.com/llvm/llvm-project/issues/61006 for history).
Then we updated the corresponding solution in https://clang.llvm.org/docs/StandardCPlusPlusModules.html#possible-issues-failed-to-find-system-headers but it doesn't work automatically. The solution requires the build systems to update the ways the invoke clang-scan-deps
.
If we don't fix the issue, the user may have a bad experience since in many distributions the compiler clang++
is a symlink.