nixpkgs/pkgs
sternenseemann 9dbcebd154 haskellPackages.mkDerivation: profiling depends on hostPlatform
Whether profiling should or should not be enabled does indeed depend on
GHC's target platform (or GHC in general, i.e. if it happens to be
ghcjs, we need to disable it). The profiling objects it produces are
excessively big if it is producing them for aarch64.

However, in a Haskell packages' derivation, GHC's and the resulting
derivation's platforms are offset

    GHC:  BUILD--HOST---TARGET
    DRV:         BUILD--HOST--(TARGET)

since we need to execute GHC in the derivation (so its host is our build
platform) and the machine code it produces need to be executable on the
host platform we are targeting. Unless our derivation is building a
compiler (or similar), the target platform of the derivation doesn't
matter.

stdenv exposes the platforms of the current derivation, not of GHC, so
checking the host platform is prudent. Changing this doesn't have a lot
of impact, since when cross-compiling Haskell packages (e.g. via
pkgsCross), host and target platform will usually be the same.
It does save unnecessary rebuilds in the buildHaskellPackages set
though, since most of the packages in here don't care about the target
platform, so they should be the same as their corresponding packages in
the ordinary (natively compiled) haskellPackages set. In short, after
this change

     pkgsCross.aarch64-multiplatform.hoogle == haskellPackages.hoogle

holds whereas it would erroneously be compiled with different profiling
settings before.
2023-06-08 18:17:38 +02:00
..
applications Merge pull request #236466 from SuperSandro2000/dnscontrol 2023-06-07 18:48:02 -04:00
build-support gcj: fix compiler 2023-06-07 01:42:02 -04:00
common-updater
data all-cabal-hashes: 2023-05-31T06:44:49Z -> 2023-06-07T04:39:28Z 2023-06-07 19:43:10 +09:00
desktops Merge pull request #236238 from bobby285271/upd/gnome 2023-06-06 14:50:19 +02:00
development haskellPackages.mkDerivation: profiling depends on hostPlatform 2023-06-08 18:17:38 +02:00
games Merge pull request #236467 from Aleksanaa/minesweep-rs 2023-06-07 21:34:53 +03:00
misc Merge pull request #236058 from rnhmjoj/pr-scc 2023-06-07 02:04:33 +02:00
os-specific Merge pull request #235588 from vdot0x23/fix/criu-docker-checkpoints 2023-06-07 20:02:50 +02:00
pkgs-lib
servers Merge pull request #236477 from 999eagle/update/invidious 2023-06-08 00:33:22 +03:00
shells nushell: 0.80.0 -> 0.81.0 2023-06-07 12:35:32 -04:00
stdenv
test
tools Merge pull request #236256 from r-ryantm/auto-update/nexttrace 2023-06-08 00:43:52 +03:00
top-level Merge pull request #234648 from kranurag7/falcoctl 2023-06-08 00:51:25 +03:00