[lld] [lld] check the format of libary and skip the wrong one (PR #78874)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 00:00:17 PST 2024


MaskRay wrote:

I think GNU ld supports some "wrong e_machine, skip" logic for `-lfoo` and we have rejected supporting this fishy behavior. We cannot think of a reasonable case this is ever desired. The solution is always to fix the build system to not provide dubious `-L` paths in the first place. For linker scripts, I think GNU ld tries skipping an incompatible script if an incompatible `OUTPUT_FORMAT` is seen. However, a question arises about what we should do if we have parsed something before `OUTPUT_FORMAT`.

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


More information about the llvm-commits mailing list