Skip to content

Commit

Permalink
Fix llvm backend bins in the k derivation (#3819)
Browse files Browse the repository at this point in the history
The refactor of the K derivation in #3806 broke the booster integration
test shell, because we stopped wrapping llvm-backend bins with the
`NIX_LLVM_KOMPILE_LIBS` env var. This PR restores that functionality and
I have confirmed this fixes the integration tests in booster.
  • Loading branch information
goodlyrottenapple authored Nov 16, 2023
1 parent b7d1dfc commit ca350c8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion nix/k.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ let
ln -sf ${llvm-backend}/include/kllvm-c $out/include/
ln -sf ${llvm-backend}/lib/kllvm $out/lib/
ln -sf ${llvm-backend}/lib/scripts $out/lib/
ln -sf ${llvm-backend}/bin/* $out/bin/
ln -sf ${haskell-backend}/bin/kore-rpc $out/bin/kore-rpc
ln -sf ${haskell-backend}/bin/kore-exec $out/bin/kore-exec
Expand All @@ -80,6 +79,18 @@ let
}"''
}
done
${if (current-llvm-kompile-libs == [ ]) then ''
ln -sf ${llvm-backend}/bin/* $out/bin/
'' else ''
for prog in ${llvm-backend}/bin/*
do
makeWrapper $prog $out/bin/$(basename $prog) \
--set NIX_LLVM_KOMPILE_LIBS "${
lib.strings.concatStringsSep " "
(lib.lists.unique current-llvm-kompile-libs)
}"
done''}
'';

preFixup = lib.optionalString (!stdenv.isDarwin) ''
Expand Down

0 comments on commit ca350c8

Please sign in to comment.