This is useful when deployed CppInterOp needs to create an interpreter. Often the interpreter itself cannot use the clang toolchain logic to discover both the resource-dir and the include paths. This is because CppInterOp is a library and usually put in the lib folder whereas the toolchain logic expects things to be relative to the bin folder.
In such setups, we can ask CppInterOp to detect the resource directory by asking clang about it. In the same vain, of finding C and C++ headers we can ask the system compiler about the include paths.
This is useful when deployed CppInterOp needs to create an interpreter. Often the interpreter itself cannot use the clang toolchain logic to discover both the resource-dir and the include paths. This is because CppInterOp is a library and usually put in the
lib
folder whereas the toolchain logic expects things to be relative to thebin
folder.In such setups, we can ask CppInterOp to detect the resource directory by asking clang about it. In the same vain, of finding C and C++ headers we can ask the system compiler about the include paths.