[PATCH] D35820: [Driver] Search compiler-rt paths in -print-file-name=

Louis Dionne via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 15 06:53:18 PDT 2023


ldionne added inline comments.
Herald added a project: All.


================
Comment at: cfe/trunk/include/clang/Driver/ToolChain.h:312
 
+  virtual std::string getCompilerRTPath() const;
+
----------------
By introducing a second way of getting the path to compiler-rt, this created inconsistencies where some platforms that implement `getCompilerRT(...)` now won't return the right value for `getCompilerRTPath()`.

Is this the intent: `getCompilerRT() == append(getCompilerRTPath(), basename(getCompilerRT(...))`? If so, I think it would make sense to refactor this a bit so that we have:

```
getCompilerRTDir(); // What's currently called getCompilerRTPath(). This would be overriden by toolchains.
getCompilerRTBasename(args...); // Exists currently, but we would override this in the toolchains instead of having a default implementation.
getCompilerRT(args...); // This would basically do append(getCompilerRTDir(), getCompilerRTBasename(args...))
```

WDYT?



Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D35820/new/

https://reviews.llvm.org/D35820



More information about the cfe-commits mailing list