nixpkgs/pkgs/development/compilers/llvm/12
sternenseemann c70dca8249 llvmPackages_*.libllvm: make llvm-config and llvm-config equivalent
LLVM's build system creates NATIVE/bin/llvm-config by reexecuting cmake
with entirely new flags. Problematically, the `CMAKE_INSTALL_*` flags
are not inherited, causing llvm-config-native to return wrong
installation paths, e. g. CMAKE_INSTALL_LIBDIR would default to `lib64`
on x86_64-linux. Previously this was masked by outputs.patch which
replaced ActiveLibDir with a string passed in from Nix, however
`--cmakedir` for example would turn out to be wrong always, breaking
cross-compilation of e. g. lld.

Additionally LLVM_ENABLE_RTTI needs to be repassed, as it is used to
determine if RTTI is available. Passing LLVM_LINK_LLVM_DYLIB is crucial
if we are building LLVM non-statically: It influences the --shared-mode
flag (which should indicate that -lLLVM is enough to link all
components) and makes --link-shared work in the first place,
i. e. llvm-config-native believes the built shared libs don't exist
unless we repass this flag.

Passing LLVM_LINK_LLVM_DYLIB=ON, however, makes the native build produce
a full libLLVM.so which is something we don't want, so we introduce a
patch which forces llvm-config to link statically against the LLVM
components it needs.
2022-01-04 11:09:43 +01:00
..
bintools llvmPackages_12: Create subdirectories for the last two packages 2021-04-24 11:43:29 +02:00
clang llvmPackages_*.clang: stop passing LLVM_CONFIG_PATH unnecessarily 2022-01-03 16:46:38 +01:00
compiler-rt pkgsStatic.llvmPackages_{{5..13},git}.compiler-rt: drop unused musl patches 2021-10-21 18:42:31 +01:00
libcxx llvmPackages.libcxx: unset _LIBCPP_USE_AVAILABILITY_APPLE 2021-12-18 10:09:25 -05:00
libcxxabi llvmPackages_12.libcxxabi: Align with 11 libcxxabi 2021-11-24 15:17:13 -08:00
libunwind llvmPackages_12: 12.0.0 -> 12.0.1 2021-07-09 10:22:08 +02:00
lld llvmPackages_12: 12.0.0 -> 12.0.1 2021-07-09 10:22:08 +02:00
lldb llvmPackages_12: 12.0.0 -> 12.0.1 2021-07-09 10:22:08 +02:00
llvm llvmPackages_*.libllvm: make llvm-config and llvm-config equivalent 2022-01-04 11:09:43 +01:00
openmp llvmPackages_12: 12.0.0 -> 12.0.1 2021-07-09 10:22:08 +02:00
default.nix lib: make extendDerivation lighter on eval 2021-10-15 16:39:10 +02:00