[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 06:31:40 PST 2022
sterni created this revision.
Herald added a subscriber: mgorny.
sterni requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When cross-compiling, in order to make the output of the native and
cross-compiled llvm-config match, one needs to re-pass all cmake flags
relevant to BuildVariables.inc via CROSS_TOOLCHAIN_FLAGS_NATIVE. If
LLVM_LINK_LLVM_DYLIB=ON is among those, building a full libLLVM shared
object is required for the native llvm-config, otherwise --shared-mode
will be incorrect and --link-shared broken.
To avoid this, we can make llvm-config link statically against the
needed components for simplicity's sake in both the native and cross
case.
Repository:
rG LLVM Github Monorepo
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,7 @@
# Add the llvm-config tool.
add_llvm_tool(llvm-config
llvm-config.cpp
+ DISABLE_LLVM_LINK_LLVM_DYLIB
)
# Compute the substitution values for various items.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116537.397056.patch
Type: text/x-patch
Size: 381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220103/7ab291cc/attachment.bin>
More information about the llvm-commits
mailing list