[llvm] [dsymutil] Filter our swiftinterface files from the toolchain. (PR #71205)
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 11:39:27 PDT 2023
================
@@ -167,6 +167,21 @@ void CompileUnit::cleanupDataAfterClonning() {
getOrigUnit().clear();
}
+/// Make a best effort to guess the
+/// Xcode.app/Contents/Developer/Toolchains/ path from an SDK path.
+static SmallString<128> guessToolChainBaseDir(StringRef SysRoot) {
+ SmallString<128> Result;
+ // Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
+ StringRef Base = SysRoot;
+ Base = sys::path::parent_path(Base);
+ if (sys::path::filename(Base) != "SDKs")
+ return Result;
+ Result = Base;
+ Base = sys::path::parent_path(Base);
+ sys::path::append(Result, "Toolchains");
+ return Result;
+}
----------------
JDevlieghere wrote:
I really wish we could avoid duplicating this. Out of scope for this patch, but I think the parallel dwarf linker should live under DWARFLinker so we can facilitate sharing files. (CC @avl-llvm)
https://github.com/llvm/llvm-project/pull/71205
More information about the llvm-commits
mailing list