[all-commits] [llvm/llvm-project] 587bdb: [llvm][cmake] never link llvm-config against llvm ...

sterni via All-commits all-commits at lists.llvm.org
Tue Jan 4 09:34:56 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 587bdb3772333763dd739021cd08bc44bcd8485d
  Author: sternenseemann <sternenseemann at systemli.org>
  Date:   2022-01-04 (Tue, 04 Jan 2022)

  Changed paths:
    M llvm/tools/llvm-config/CMakeLists.txt

  Log Message:
  [llvm][cmake] never link llvm-config against llvm dylib

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

Reviewed By: beanz

Differential Revision: https://reviews.llvm.org/D116537

More information about the All-commits mailing list