[PATCH] D43621: [Driver] Allow using a canonical form of '-fuse-ld=' when cross-compiling on Windows.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 02:09:48 PST 2018

ikudrin added a comment.

Not all toolchains call `ToolChain::GetLinkerPath`. For example, MSVC toolchain uses its own code:

  void visualstudio::Linker::ConstructJob(...) {
    StringRef Linker = Args.getLastArgValue(options::OPT_fuse_ld_EQ, "link");
    if (Linker.equals_lower("lld"))
      Linker = "lld-link";

In my case, I am trying to cross-compile:

  > ...\clang.exe a.cpp -fuse-ld=lld -target i686-pc-linux-gnu
  clang.exe: error: invalid linker name in argument '-fuse-ld=lld'

  rC Clang


More information about the llvm-commits mailing list