[PATCH] D25263: [Driver] Allow setting the default linker during build

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 30 23:35:22 PST 2016


Hahnfeld added inline comments.


================
Comment at: lib/Driver/ToolChain.cpp:721-724
+
+const char *ToolChain::getDefaultLinker() const {
+  return CLANG_DEFAULT_LINKER;
+}
----------------
sfertile wrote:
> Hahnfeld wrote:
> > I think this could go into the header
> The CLANG_DEFAULT_LINKER macro is getting defined in "clang/Config/config.h" which isn't meant to be included in other headers.
Right, that does not work for the current version of the patch.

It was meant in conjunction with this comment:
> `CLANG_DEFAULT_LINKER` should override whatever the platform default is. So `ToolChain::getDefaultLinker()` should return `ld` as the variable `DefaultLinker` currently says and the logic should be in `ToolChain::GetLinkerPath()`.


Repository:
  rL LLVM

https://reviews.llvm.org/D25263





More information about the cfe-commits mailing list