[PATCH] D151188: [lld] Find resource and lib dir
Tobias Hieta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 25 04:33:08 PDT 2023
thieta added a comment.
In D151188#4368335 <https://reviews.llvm.org/D151188#4368335>, @hans wrote:
> I think we should aim for this to work out of the box:
Yep! Agreed.
> So how about we:
>
> - Make `lld-link` implicitly add the compiler's `lib` dir to its library search path (this patch)
> - Make clang pass the path to the builtins library, relative to that lib dir, as a `--dependent-lib` (and other libraries as needed)
> - Make `lld-link` allow dependent libs to have relative paths
Sounds like a good plan to me. I think the code changes will be straightforward at this point, at least in LLD.
> (The ideal would be to only add these dependent libraries when we actually need them, otherwise it breaks linking with link.exe. Or maybe we could do this only with `-fuse-ld=lld`?)
Yeah, this is going to be a bit tricky, I guess. In that case, we need to expose that flag in clang-cl as well - it's not perfect, but I don't have a better idea at this point.
I'll start by changing this patch to include the base dir to the search paths.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151188/new/
https://reviews.llvm.org/D151188
More information about the llvm-commits
mailing list