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

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 4 01:45:31 PST 2022


mstorsjo added a comment.

In D116537#3218590 <https://reviews.llvm.org/D116537#3218590>, @sterni wrote:

> In D116537#3217849 <https://reviews.llvm.org/D116537#3217849>, @mstorsjo wrote:
>
>> What do you think about not passing in `LLVM_LINK_LLVM_DYLIB` to the internal, chained cmake build for the native tools (or forcing it to false)? Either as complement to or replacement for this patch.
>
> `LLVM_LINK_LLVM_DYLIB` isn't actually forwarded from the cross build to the native (re)configuration (only very few variables are), but it is actually desirable to pass this explicitly: If I want to cross compile something that depends on LLVM, I'd want native `llvm-config` to behave exactly as `llvm-config` would when executed on the target machine. `llvm-config`'s behavior depends on the configuration variables via `BuildVariables.inc` which is generated independently for native and cross.

Ok, so the missing context is that you're manually forwarding this by setting e.g. `-DLLVM_LINK_LLVM_DYLIB=ON -DCROSS_TOOLCHAIN_FLAGS_NATIVE="... -DLLVM_LINK_LLVM_DYLIB=ON ..."`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116537



More information about the llvm-commits mailing list