[PATCH] D100901: [CMake][llvm] The first argument to check_linker_flag is the language

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 18:30:24 PDT 2021


JDevlieghere requested changes to this revision.
JDevlieghere added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:892
   include(CheckLinkerFlag)
-  check_linker_flag("-Wl,--color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS)
+  check_linker_flag(CXX "-Wl,--color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS)
   append_if(LINKER_SUPPORTS_COLOR_DIAGNOSTICS "-Wl,--color-diagnostics"
----------------
I don't think this is CMake's `check_linker_flag` but rather the one from `CheckLinkerFlag.cmake`. Given that this requires CMake 3.18 and we support older versios, we will continue to need the wrapper until that gets bumped. I think we should probably update the function and rename it to avoid the name collision (and maybe implement it in terms of `check_linker_flag(CXX ...` when the CMake version is >=3.18.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100901



More information about the llvm-commits mailing list