[lld] [LLD] [MinGW] Recognize the -rpath option (PR #102886)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 17 14:43:35 PDT 2024


mstorsjo wrote:

> Frankly I wish that we do not add the workaround like this (especially for "dangerous" options like `-rpath`, whose ignoring in ELF could be very wrong). However, I don't know the MinGW ecosystem well. If you think this is the right thing to retain a workaround forever, LGTM.

Ok - I'll go ahead and merge it. Thanks for your opinion!

Indeed, in ELF, ignoring `-rpath` would be very fatal.

But in practice, because GNU ld essentially accepts all the same options that it does on ELF (except for some, like `-z`, I think) also for MinGW, users can end up passing unnecessary/redundant ones. So while we ideally shouldn't add things like this, this gets rid of yet another difference that users may stumble upon. And thanks to the warning, the use of it shouldn't increase anyway.

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


More information about the llvm-commits mailing list