diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-20 14:43:41 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2018-08-30 17:20:32 -0400 |
commit | 0828e2d8c369604c56219bd7085256b984087280 (patch) | |
tree | 507e0429674ad3a42bf5dcd11413d3c834f95c74 /pkgs/development/compilers | |
parent | 2c2f1e37d4374ea61caefd9389927ea03df4ce31 (diff) |
treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
Diffstat (limited to 'pkgs/development/compilers')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/7.10.3.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.0.2.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.2.2.nix | 9 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.4.3.nix | 13 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/8.6.1.nix | 13 | ||||
-rw-r--r-- | pkgs/development/compilers/ghc/head.nix | 13 | ||||
-rw-r--r-- | pkgs/development/compilers/llvm/3.9/llvm.nix | 8 | ||||
-rw-r--r-- | pkgs/development/compilers/rust/rustc.nix | 1 |
15 files changed, 95 insertions, 78 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 3e9ddacac1b4..ed185b4be1a2 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,14 +20,14 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -42,7 +42,7 @@ assert cloog != null -> isl != null; assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -54,6 +54,8 @@ let version = "4.8.5"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ] ++ optional enableParallelBuilding ../parallel-bconfig.patch ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 9b4444b905de..3f13562c1b8c 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs, fetchpatch , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,14 +20,14 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -42,7 +42,7 @@ assert cloog != null -> isl != null; assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -54,6 +54,8 @@ let version = "4.9.4"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ../use-source-date-epoch.patch ] ++ optionals enableParallelBuilding [ ../parallel-bconfig.patch ./parallel-strsignal.patch ] diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 3fdec1ec3103..497ca40c3ae6 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,15 +20,15 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -40,7 +40,7 @@ assert langJava -> zip != null && unzip != null assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -53,6 +53,8 @@ let version = "5.5.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ../use-source-date-epoch.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 099e26375f41..3f5d3172d12f 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langJava ? false , langGo ? false , profiledCompiler ? false @@ -20,15 +20,15 @@ , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -40,7 +40,7 @@ assert langJava -> zip != null && unzip != null assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -52,6 +52,8 @@ let version = "6.4.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ../use-source-date-epoch.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 60e429cc4da1..30c1611f5fb3 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -13,15 +13,15 @@ , isl ? null # optional, for the Graphite optimization framework. , zlib ? null , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -29,7 +29,7 @@ assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -41,6 +41,8 @@ let version = "7.3.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html ./riscv-pthread-reentrant.patch diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index a05c1c718128..727cd9cbdbd7 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -13,15 +13,15 @@ , isl ? null # optional, for the Graphite optimization framework. , zlib ? null , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -29,7 +29,7 @@ assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -41,6 +41,8 @@ let version = "8.2.0"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index 275b380e90f7..dd6de818117f 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -1,7 +1,7 @@ { stdenv, targetPackages, fetchurl, noSysDirs , langC ? true, langCC ? true, langFortran ? false -, langObjC ? targetPlatform.isDarwin -, langObjCpp ? targetPlatform.isDarwin +, langObjC ? stdenv.targetPlatform.isDarwin +, langObjCpp ? stdenv.targetPlatform.isDarwin , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -13,16 +13,16 @@ , isl ? null # optional, for the Graphite optimization framework. , zlib ? null , enableMultilib ? false -, enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins +, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false , # Strip kills static libs of other archs (hence no cross) - stripped ? hostPlatform == buildPlatform && targetPlatform == hostPlatform + stripped ? stdenv.hostPlatform == stdenv.buildPlatform + && stdenv.targetPlatform == stdenv.hostPlatform , gnused ? null , cloog # unused; just for compat with gcc4, as we override the parameter on some places , flex ? null -, buildPlatform, hostPlatform, targetPlatform , buildPackages }: @@ -30,7 +30,7 @@ assert libelf != null -> zlib != null; # Make sure we get GNU sed. -assert hostPlatform.isDarwin -> gnused != null; +assert stdenv.hostPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; @@ -42,6 +42,8 @@ let version = "7-20170409"; enableParallelBuilding = true; + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + patches = [ ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix index 0cf3a4cb12b4..9c87d815b4a9 100644 --- a/pkgs/development/compilers/ghc/7.10.3.nix +++ b/pkgs/development/compilers/ghc/7.10.3.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, hscolour @@ -8,7 +7,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -19,7 +18,7 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. @@ -27,10 +26,12 @@ , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index ddd9c27589ac..935d09b57446 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 +, useLLVM ? !stdenv.targetPlatform.isx86 , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,7 +17,7 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. @@ -26,12 +25,14 @@ , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.2.2.nix b/pkgs/development/compilers/ghc/8.2.2.nix index 79c910e5fd21..cf448d8d849a 100644 --- a/pkgs/development/compilers/ghc/8.2.2.nix +++ b/pkgs/development/compilers/ghc/8.2.2.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -8,7 +7,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -19,7 +18,7 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. @@ -27,7 +26,7 @@ , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" , # Whether to backport https://phabricator.haskell.org/D4388 for # deterministic profiling symbol names, at the cost of a slightly # non-standard GHC API @@ -37,6 +36,8 @@ assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix index f30c8dd8622e..aa9fab184364 100644 --- a/pkgs/development/compilers/ghc/8.4.3.nix +++ b/pkgs/development/compilers/ghc/8.4.3.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,18 +17,18 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt , # Whetherto build terminfo. - enableTerminfo ? !targetPlatform.isWindows + enableTerminfo ? !stdenv.targetPlatform.isWindows , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" , # Whether to backport https://phabricator.haskell.org/D4388 for # deterministic profiling symbol names, at the cost of a slightly # non-standard GHC API @@ -39,6 +38,8 @@ assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/8.6.1.nix b/pkgs/development/compilers/ghc/8.6.1.nix index fdb60ce3f2e8..7fcb52969151 100644 --- a/pkgs/development/compilers/ghc/8.6.1.nix +++ b/pkgs/development/compilers/ghc/8.6.1.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,23 +17,25 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useiOSPrebuilt + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt , # Whetherto build terminfo. - enableTerminfo ? !targetPlatform.isWindows + enableTerminfo ? !stdenv.targetPlatform.isWindows , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: assert !enableIntegerSimple -> gmp != null; let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 2824ce669ee6..ee95bd0f6047 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,5 +1,4 @@ { stdenv, targetPackages -, buildPlatform, hostPlatform, targetPlatform # build-tools , bootPkgs, alex, happy, hscolour @@ -7,7 +6,7 @@ , libiconv ? null, ncurses -, useLLVM ? !targetPlatform.isx86 || (targetPlatform.isMusl && hostPlatform != targetPlatform) +, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. @@ -18,22 +17,24 @@ enableIntegerSimple ? !(gmp.meta.available or false), gmp , # If enabled, use -fPIC when compiling static libs. - enableRelocatedStaticLibs ? targetPlatform != hostPlatform + enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform , # Whether to build dynamic libs for the standard library (on the target # platform). Static libs are always built. - enableShared ? !targetPlatform.isWindows && !targetPlatform.useAndroidPrebuilt + enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useAndroidPrebuilt , # Whetherto build terminfo. - enableTerminfo ? !targetPlatform.isWindows + enableTerminfo ? !stdenv.targetPlatform.isWindows , version ? "8.5.20180118" , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. - ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross" + ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross" }: let + inherit (stdenv) buildPlatform hostPlatform targetPlatform; + inherit (bootPkgs) ghc; # TODO(@Ericson2314) Make unconditional diff --git a/pkgs/development/compilers/llvm/3.9/llvm.nix b/pkgs/development/compilers/llvm/3.9/llvm.nix index dfeddf2fe65a..9e7fbbe96c35 100644 --- a/pkgs/development/compilers/llvm/3.9/llvm.nix +++ b/pkgs/development/compilers/llvm/3.9/llvm.nix @@ -13,13 +13,11 @@ , zlib , compiler-rt_src , debugVersion ? false -, enableSharedLibraries ? (buildPlatform == hostPlatform) +, enableSharedLibraries ? (stdenv.buildPlatform == stdenv.hostPlatform) , buildPackages -, buildPlatform -, hostPlatform }: -assert (hostPlatform != buildPlatform) -> !enableSharedLibraries; +assert (stdenv.hostPlatform != stdenv.buildPlatform) -> !enableSharedLibraries; let src = fetch "llvm" "1vi9sf7rx1q04wj479rsvxayb6z740iaz3qniwp266fgp5a07n8z"; @@ -131,7 +129,7 @@ in stdenv.mkDerivation rec { ++ stdenv.lib.optionals (isDarwin) [ "-DLLVM_ENABLE_LIBCXX=ON" "-DCAN_TARGET_i386=false" - ] ++ stdenv.lib.optionals (buildPlatform != hostPlatform) [ + ] ++ stdenv.lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-DCMAKE_CROSSCOMPILING=True" "-DLLVM_TABLEGEN=${buildPackages.llvmPackages_39.llvm}/bin/llvm-tblgen" ] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [ diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 23aa750060a3..9c9788ff4834 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -12,7 +12,6 @@ , targetToolchains , doCheck ? true , broken ? false -, buildPlatform, hostPlatform }: let |