[clang] [Clang][Darwin] Centralize framework search paths for headers & libraries. (PR #118543)
Cyndy Ishida via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 17 08:32:15 PST 2024
================
@@ -150,3 +150,23 @@ clang::parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS, StringRef SDKRootPath) {
return llvm::make_error<llvm::StringError>("invalid SDKSettings.json",
llvm::inconvertibleErrorCode());
}
+
+// For certain platforms/environments almost all resources (e.g., headers) are
+// located in sub-directories, e.g., for DriverKit they live in
+// <SYSROOT>/System/DriverKit/usr/include (instead of <SYSROOT>/usr/include).
+StringRef clang::getSystemPrefix(const llvm::Triple &T) {
+ if (T.isDriverKit())
+ return "/System/DriverKit";
+ return "";
+}
+
+KnownSystemPaths clang::getCommonSystemPaths(llvm::Triple T) {
----------------
cyndyishida wrote:
yeah, I was initially thinking any common paths between header & linker search which in practice is only frameworks but could be extended in the future. That feels unlikely though. I can apply your suggestion, assuming it's still relevant, after rebasing your patch.
https://github.com/llvm/llvm-project/pull/118543
More information about the cfe-commits
mailing list