[clang] [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin (PR #87866)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 16 12:19:02 PDT 2024


estewart08 wrote:

> > Is it expected now that `clang --print-runtime-dir` will always have the clang host triple appended even if `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is off? I guess I was expecting to see `lib/linux` instead of `lib/x86_64-unknown-linux-gnu`.
> 
> https://reviews.llvm.org/D98868 introduced `--print-runtime-dir`. The question is whether `--print-runtime-dir` should print the legacy `lib/linux` when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` is off. Personally I'd hope that `--print-runtime-dir` does not try to be smart and users should be able to expect that it always prints the new hierarchy.
> 
> With the old hierarchy, the user is expected to know how to derive `libclang_rt.builtins-aarch64.a` from `libclang_rt.builtins.a`. In this case, they can extract the directory name from `clang --print-file-name=libclang_rt.builtins-aarch64.a`.

Just odd that a legitimate configuration `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF`, unless this configuration is no longer valid, will result in a non-existent path being returned for the runtime directory.

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


More information about the cfe-commits mailing list