[PATCH] D134206: Fix -fuse-ld to be linker flag in feature detection check

Kevin Gleason via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 13:37:29 PDT 2022


GleasonK added a comment.

In D134206#3800765 <https://reviews.llvm.org/D134206#3800765>, @tschuett wrote:

> I have similar issues, but I use `-DLLVM_ENABLE_WERROR=ON`.

That is what I ended up doing in https://github.com/openxla/stablehlo/pull/137 (`LLVM_ENABLE_WERROR` / `LLVM_ENABLE_WARNINGS`), which unblocked me. Based on conversation with Mehdi in that thread I figured I would still propose this fix, since it was strange for `-fuse-ld` to end up in the cxx flags instead of linker flags.

It looks like `check_cxx_source_compiles` picks up changes to `CMAKE_EXE_LINKER_FLAGS`, since setting a nonsense value like `-DLLVM_USE_LINKER=notalinker` will still error on this line.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134206



More information about the llvm-commits mailing list