================ @@ -250,6 +247,25 @@ void Driver::setDriverMode(StringRef Value) { Diag(diag::err_drv_unsupported_option_argument) << OptName << Value; } +void Driver::setResourceDirectory() { + // Compute the path to the resource directory, depending on the driver mode. + switch (Mode) { + case GCCMode: + case GXXMode: + case CPPMode: + case CLMode: + case DXCMode: + ResourceDir = GetResourcesPath(ClangExecutable, CLANG_RESOURCE_DIR); + break; + case FlangMode: + // TODO: Is there a better way to add the "../include/flang/" component? + SmallString<64> relPath{}; + llvm::sys::path::append(relPath, "..", "include", "flang"); + ResourceDir = GetResourcesPath(ClangExecutable, relPath); + break; ---------------- mjklemm wrote:
Reviewers, please let me know if that approach is too simplistic. I would also like to get your feedback on whether this should be pointing to `$FLANG_BIN/../include` instead. Please suggest. https://github.com/llvm/llvm-project/pull/90886 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits