[PATCH] D116492: [lld] Deprecate using llvm-config to detect llvm installation

John Ericson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 2 07:25:51 PST 2022


Ericson2314 added a comment.

In D116492#3290087 <https://reviews.llvm.org/D116492#3290087>, @nikic wrote:

> Would it be possible to share a complete new-style cmake invocation that is supposed to work?

Our standalone LLD package in Nixpkgs works, but I see now we have been passing `-DLLVM_MAIN_SRC_DIR` all along.

> If I only point LLVM_DIR to the cmake directory, then LLVM_MAIN_SRC_DIR ends up being empty (it is set to MAIN_SRC_DIR, which, as far as I can tell, is only initialized in the LLVM_CONFIG code path).

https://reviews.llvm.org/D51714 did just that, and it was never changed in the years since, so I figured I was missing something and it somehow worked.



================
Comment at: lld/CMakeLists.txt:14
+  set(LLVM_CONFIG_OUTPUT)
+  if(LLVM_CONFIG)
+    set (LLVM_CONFIG_FOUND 1)
----------------
nikic wrote:
> Is it intentional that lld now requires you to set LLVM_CONFIG instead of LLVM_CONFIG_PATH? Based on the deprecation, I would have assumed that the previous name would be retained.
I was just following what Clang does, but I see now in https://reviews.llvm.org/D51714 that was preserving the existing name. I suppose this should be changed back, then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116492



More information about the llvm-commits mailing list