[PATCH] D85309: [Driver] Support GNU ld on Solaris

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 30 14:10:42 PDT 2023


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:305
 
+bool tools::isLinkerGnuLd(const ToolChain &TC, const ArgList &Args) {
+  // Only used if targetting Solaris.
----------------
I suppose that this should be in a Solaris specific file to indicate that it's not for other systems.

GNU ld is almost ubiquitous on Linux and is almost always available at /usr/bin/ld (with very few distributions using others linkers by default or providing an option).

Detecting linker to affect driver decisions is we Linux are very wary of. We are nervous even trying to do some stuff only related to lld.

We likely don't want this function to be in CommonArgs to lure other contributors to use.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85309



More information about the cfe-commits mailing list