[PATCH] D116537: [llvm][cmake] never link llvm-config against llvm dylib

sterni via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 3 17:41:43 PST 2022


sterni updated this revision to Diff 397167.
sterni added a comment.

Add suggest comment above DISABLE_LLVM_LINK_LLVM_DYLIB

Also reworded commit message slightly to (hopefully) make it a bit clearer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116537

Files:
  llvm/tools/llvm-config/CMakeLists.txt


Index: llvm/tools/llvm-config/CMakeLists.txt
===================================================================
--- llvm/tools/llvm-config/CMakeLists.txt
+++ llvm/tools/llvm-config/CMakeLists.txt
@@ -6,6 +6,12 @@
 # Add the llvm-config tool.
 add_llvm_tool(llvm-config
   llvm-config.cpp
+  # This utility doesn't use much of LLVM, so linking a shared library for the
+  # entire thing is overkill. Avoiding that especially saves on build time when cross
+  # compiling LLVM and building both cross and native `llvm-config`s. We don't
+  # want to build an entire native libLLVM.so in addition to the cross one just
+  # for the native `llvm-config`!
+  DISABLE_LLVM_LINK_LLVM_DYLIB
   )
 
 # Compute the substitution values for various items.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116537.397167.patch
Type: text/x-patch
Size: 745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220104/cdc9913c/attachment.bin>


More information about the llvm-commits mailing list