[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver

Rui Ueyama via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 3 10:10:04 PST 2019


ruiu added a comment.

In D56215#1344279 <https://reviews.llvm.org/D56215#1344279>, @krytarowski wrote:

> In D56215#1344233 <https://reviews.llvm.org/D56215#1344233>, @ruiu wrote:
>
> > lld's driver is intentionally designed to be agnostic of the host that the linker is running for the reasons described at the beginning of Driver.cpp: https://github.com/llvm-project/lld/blob/master/ELF/Driver.cpp#L13 I think I like that approach. If you need to do this, you can do this in the compiler driver rather than in the linker itself. Is there any reason you need to do this in the linker?
>
>
> This breaks compat with GNU ld here and the linker is intended to be used standalone.


This is where lld is not 100% compatible with GNU ld, but I'd think that's not a bad thing. I'd like to make lld agnostics of host OS so that the linker works exactly in the same way on any operating systems, which makes cross linking much easier to do. So, both a run-time detection of a host OS or a configure-time customization are I think undesirable.


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D56215





More information about the cfe-commits mailing list