[PATCH] D69030: [cmake] Suppress unknown argument warning when linking with lld-link

Russell Gallop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 04:01:34 PDT 2019


russell.gallop added a comment.

In D69030#1711564 <https://reviews.llvm.org/D69030#1711564>, @thakis wrote:

> Hm, we don't see these warnings. We use `CMAKE_LINKER=C:/b/s/w/ir/cache/builder/src/third_party/llvm-bootstrap-install/bin/lld-link.exe` to make cmake use lld-link. It looks like the bot you link to explicitly sets `-DLLVM_USE_LINKER=lld` which I always figured translates to "pass this -fuse-ld" flag. So I'd say the bot configuration is maybe not quite right? I'd fix that instead.


Ah, I got the settings from the bot, but that makes sense.

> Maybe we should have a "LLVM_USE_LINKER" and CMAKE_LINKER can't be set at the same time" warning instead?

Hmm, I think that makes sense. CMake defaults to using the compiler for linking. Is there a case where you'd want to specify a different compiler with CMAKE_LINKER then add LLVM_USE_LINKER?

> But if this change helps you somehow, I don't see a problem with landing it either.

I think that landing this might confuse the usage (even more). I think that warning against this would help clarify the situation.

Scanned through the bot configuration and it is just:
clang-x64-windows-msvc
sanitizer-windows

that use that combination. I'll put up review to change that, then look at adding a warning.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69030





More information about the llvm-commits mailing list