[PATCH] D98113: [Driver] Also search FilePaths for compiler-rt before falling back

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 6 09:25:26 PST 2021


jrtc27 added a comment.

One thing that is currently rather ugly about BareMetal is that it ignores the AddArch argument. Once you have a sysroot, the architecture suffix is rather unnecessary, and given compiler-rt uses LLVM_ENABLE_PER_TARGET_RUNTIME_DIR to decide both whether to add a suffix and whether to add `lib/${OS}` to the install path, that means you can't nicely point compiler-rt at the sysroot as the install directory (well, unless you do something like make COMPILER_RT_OUTPUT_DIR point at the sysroot not the libdir and set COMPILER_RT_OS_DIR to `.` (or maybe the empty string also works)).

Ideally BareMetal would honour AddArch like the other toolchains, but you then have several issues:

1. Are people relying on AddArch _not_ being honoured for things added to LibraryPaths (and therefore you need to check for both)?

2. AddLinkRuntimeLib similarly hard-codes the fact that the architecture suffix is added. Changing it to use getCompilerRTArgString might work, but does subtly change things as then the path is provided to the linker, not a `-l` argument.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98113



More information about the cfe-commits mailing list