[PATCH] D70048: [LLD] Add NetBSD support as a new flavor of LLD (nb.lld)

Rui Ueyama via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 11 23:57:24 PST 2019


ruiu added a comment.

lld is not that Linux-centric as you implied in your comment. We have code for FreeBSD, OpenBSD, AMDGPU and Fuchsia (which isn't even a POSIX system), and adding code for NetBSD is OK and is appreciated. However, the thing we've been trying to avoid is to hard-code a platform-specific knowledge such as library paths to the linker. Combined with the fact that lld doesn't provide a way to enable/disable targets at build-time, all ld.lld executables (sometimes installed as /usr/bin/ld) work the same way no matter where they are run on. That helps those who do cross compilation a lot. That is a very appreciated property of our linker, and I don't think I want make an exception for NetBSD. Even on NetBSD, lld should behave the same as running on other kind of hosts.

Also, frankly speaking, having a driver only for NetBSD seems very odd to me. We would have 5 drivers for MSVC link.exe, MinGW, ELF-based systems, macOS, and NetBSD? That doesn't feel right. If you strongly feel that the linker should know the library paths and the like, it shouldn't be too hard to write a shell script wrapper to wrap lld.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70048





More information about the cfe-commits mailing list