Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0277cc1f1cb2
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 55ac8ffa43fa
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Oct 11, 2019

  1. ocamlPackages.llvm: propagate needed libs, fix missing build parameter

    The opam patch makes ocaml link dependent executables with
    -L${LLVM_OCAML_EXTERNAL_LLVM_LIBDIR}. This variable was previously
    undefined and as a result the linker would previously be called with
    just -L which makes it ignore the next argument. This would lead strange
    linking errors, like missing caml_apply2.
    
    Despite defining this variable correctly, propagating llvm is still
    necessary for linking to complete. In case ocaml-llvm is a transitive
    dependency only, propagatedBuildInputs is not enough. To avoid having to
    guess which version of llvm was used, we provide the right one in
    passthrough.
    symphorien authored and vbgl committed Oct 11, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    dimkl Dimitris Klouvas
    Copy the full SHA
    55ac8ff View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 pkgs/development/ocaml-modules/llvm/default.nix
8 changes: 7 additions & 1 deletion pkgs/development/ocaml-modules/llvm/default.nix
Original file line number Diff line number Diff line change
@@ -8,7 +8,8 @@ stdenv.mkDerivation {

inherit (llvm) src;

buildInputs = [ python cmake llvm ocaml findlib ctypes ];
buildInputs = [ python cmake ocaml findlib ctypes ];
propagatedBuildInputs = [ llvm ];

patches = [ (fetchpatch {
url = https://raw.githubusercontent.com/ocaml/opam-repository/2bdc193f5a9305ea93bf0f0dfc1fbc327c8b9306/packages/llvm/llvm.7.0.0/files/fix-shared.patch;
@@ -18,6 +19,7 @@ stdenv.mkDerivation {
cmakeFlags = [
"-DLLVM_OCAML_OUT_OF_TREE=TRUE"
"-DLLVM_OCAML_INSTALL_PATH=${placeholder "out"}/ocaml"
"-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR=${stdenv.lib.getLib llvm}/lib"
];

buildFlags = "ocaml_all";
@@ -30,6 +32,10 @@ stdenv.mkDerivation {
mv $OCAMLFIND_DESTDIR/llvm/META{.llvm,}
'';

passthru = {
inherit llvm;
};

meta = {
inherit (llvm.meta) license homepage;
platforms = ocaml.meta.platforms or [];