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

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 8 14:58:37 PST 2019


arichardson added inline comments.


================
Comment at: ELF/Driver.cpp:770
+  // Start with a default initial triple
+  Config->TargetTriple = llvm::Triple(getDefaultTargetTriple());
+
----------------
If I invoke an unprefixed ld.lld on NetBSD but want to target a different operating system, this will cause all the NetBSD defaults to apply to that binary and will possibly cause it to crash at runtime.

I think any config changes based on a triple would need to use an explicit --target= flag instead. As @ruiu says, LLD's behaviour should not change depending on the host OS/default LLVM triple. Given the same input files and command line options the resulting binary should be identical on any host.


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

https://reviews.llvm.org/D56215





More information about the cfe-commits mailing list