Skip to content

Commit

Permalink
stdenv-darwin: bump to use LLVM 4.0 & new bootstrap tools
Browse files Browse the repository at this point in the history
  • Loading branch information
copumpkin committed Apr 7, 2017
1 parent 57e2517 commit b9e5585
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 22 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/compilers/llvm/4/default.nix
@@ -1,6 +1,6 @@
{ newScope, stdenv, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
{ newScope, stdenv, cmake, libxml2, python2, isl, fetchurl, overrideCC, wrapCC, darwin, ccWrapperFun }:
let
callPackage = newScope (self // { inherit stdenv isl release_version version fetch; });
callPackage = newScope (self // { inherit stdenv cmake libxml2 python2 isl release_version version fetch; });

release_version = "4.0.0";
version = release_version; # differentiating these is important for rc's
Expand Down
24 changes: 13 additions & 11 deletions pkgs/stdenv/darwin/default.nix
Expand Up @@ -4,15 +4,15 @@
# Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools
, bootstrapFiles ? let
fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> {
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/33f59c9d11b8d5014dfd18cc11a425f6393c884a/${file}";
url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/c4effbe806be9a0a3727fdbbc9a5e28149347532/${file}";
inherit (localSystem) system;
inherit sha256 executable;
}; in {
sh = fetch { file = "sh"; sha256 = "1rx4kg6358xdj05z0m139a0zn4f4zfmq4n4vimlmnwyfiyn4x7wk"; };
bzip2 = fetch { file = "bzip2"; sha256 = "104qnhzk79vkbp2yi0kci6lszgfppvrwk3rgxhry842ly1xz2r7l"; };
mkdir = fetch { file = "mkdir"; sha256 = "0d91c19xjzmqisncvldv79d7ddzai9l7vcmajhwlwwv74g6da5yl"; };
cpio = fetch { file = "cpio"; sha256 = "0lw057bmcqls96j0gv1n3mgl66q31mba7i413cbkkaf0rfzz3dxj"; };
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "13ihbj002pis3fgy1d9c4fi7flca21z9brjsjkklm82h5b4nlwxl"; executable = false; };
sh = fetch { file = "sh"; sha256 = "1b9r3dksj907bpxp589yhc4217cas73vni8sng4r57f04ydjcinr"; };
bzip2 = fetch { file = "bzip2"; sha256 = "1wm28jgap4cbr8hf4ambg6h9flr2b4mcbh7fw20i0l51v6n8igky"; };
mkdir = fetch { file = "mkdir"; sha256 = "0jc32mzx2whhx2xh70grvvgz4jj26118p9yxmhjqcysagc0k7y66"; };
cpio = fetch { file = "cpio"; sha256 = "0x5dcczkzn0g8yb4pah449jmgy3nmpzrqy4s480grcx05b6v6hkp"; };
tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "0ifdc8bwxdhmpbhx2vd3lwjg71gqm6pi5mfm0fkcsbqavl8hd8hz"; executable = false; };
}
}:

Expand Down Expand Up @@ -301,18 +301,20 @@ in rec {

allowedRequisites = (with pkgs; [
xz.out xz.bin libcxx libcxxabi icu.out gmp.out gnumake findutils bzip2.out
bzip2.bin llvmPackages.llvm zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar
gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk
gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out
binutils-raw.dev binutils gettext
]) ++ (with pkgs.darwin; [
dyld Libsystem CF cctools libiconv locale
]);

overrides = self: super: persistent4 prevStage self super // {
clang = cc;
inherit cc;
};
overrides = self: super:
let persistent = persistent4 prevStage self super; in persistent // {
clang = cc;
llvmPackages = persistent.llvmPackages // { clang = cc; };
inherit cc;
};
};

stagesDarwin = [
Expand Down
18 changes: 9 additions & 9 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -5421,7 +5421,7 @@ with pkgs;
llvm_34 = llvmPackages_34.llvm;

llvmPackages = recurseIntoAttrs
(if stdenv.isDarwin then llvmPackages_37 else llvmPackages_39);
(if stdenv.isDarwin then llvmPackages_4 else llvmPackages_39);

llvmPackagesSelf = llvmPackages_34.override {
stdenv = libcxxStdenv;
Expand All @@ -5435,13 +5435,9 @@ with pkgs;
isl = isl_0_14;
};

llvmPackages_37 = callPackage ../development/compilers/llvm/3.7 ({
llvmPackages_37 = callPackage ../development/compilers/llvm/3.7 {
inherit (stdenvAdapters) overrideCC;
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
cmake = cmake.override { isBootstrap = true; useSharedLibraries = false; };
libxml2 = libxml2.override { pythonSupport = false; };
python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; };
});
};

llvmPackages_38 = callPackage ../development/compilers/llvm/3.8 {
inherit (stdenvAdapters) overrideCC;
Expand All @@ -5451,9 +5447,13 @@ with pkgs;
inherit (stdenvAdapters) overrideCC;
};

llvmPackages_4 = callPackage ../development/compilers/llvm/4 {
llvmPackages_4 = callPackage ../development/compilers/llvm/4 ({
inherit (stdenvAdapters) overrideCC;
};
} // stdenv.lib.optionalAttrs stdenv.isDarwin {
cmake = cmake.override { isBootstrap = true; useSharedLibraries = false; };
libxml2 = libxml2.override { pythonSupport = false; };
python2 = callPackage ../development/interpreters/python/cpython/2.7/boot.nix { inherit (darwin) CF configd; };
});

manticore = callPackage ../development/compilers/manticore { };

Expand Down

0 comments on commit b9e5585

Please sign in to comment.