[llvm] [dsymutil] Filter our swiftinterface files from the toolchain. (PR #71205)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 3 13:09:35 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;
+}
----------------
avl-llvm wrote:

f.e. 
DWARFLinker/
DWARFLinker/Apple
DWARFLinker/Parallel

DWARFLinker would contain code which goes to DWARFLinkerBase library.
DWARFLinker/Apple would contain code for apple DWARFLinker and will use DWARFLinkerBase library.
DWARFLinker/Parallel would contain code for llvm DWARFLinker and will use DWARFLinkerBase library.

?

https://github.com/llvm/llvm-project/pull/71205


More information about the llvm-commits mailing list