chore: LLVM: 10 -> 12

This commit is contained in:
Sebastian Ullrich 2021-08-05 15:07:43 +02:00
parent c78bbc6c9c
commit d52908d3b7

View file

@ -4,7 +4,7 @@ let
nix-pinned = writeShellScriptBin "nix" ''
${nix.defaultPackage.${system}}/bin/nix --experimental-features 'nix-command flakes' --extra-substituters https://lean4.cachix.org/ --option warn-dirty false "$@"
'';
llvmPackages = llvmPackages_10;
llvmPackages = llvmPackages_12;
cc = (ccacheWrapper.override rec {
cc = llvmPackages.clang;
extraConfig = ''
@ -25,9 +25,15 @@ let
# https://github.com/NixOS/nixpkgs/issues/119779
installPhase = builtins.replaceStrings ["use_response_file_by_default=1"] ["use_response_file_by_default=0"] old.installPhase;
});
stdenv = overrideCC llvmPackages.stdenv cc;
stdenv' = if stdenv.isLinux then useGoldLinker stdenv else stdenv // {
mkDerivation = args: stdenv.mkDerivation (args // {
# https://github.com/NixOS/nixpkgs/issues/130963
NIX_CFLAGS_LINK = toString (args.NIX_CFLAGS_LINK or "") + " -lc++abi";
});
};
lean = callPackage (import ./bootstrap.nix) (args // {
stdenv = if stdenv.isLinux then useGoldLinker stdenv else stdenv;
stdenv = stdenv';
inherit buildLeanPackage;
});
makeOverridableLeanPackage = f: