Skip to content

Commit

Permalink
Fix ghc-iserv for profiling
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishmack committed Mar 15, 2024
1 parent 9dbf6c8 commit f4c9691
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 1 addition & 0 deletions builder/ghc-for-component-wrapper.nix
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ let
''
+ lib.optionalString (stdenv.targetPlatform.isMusl && !haskellLib.isNativeMusl && builtins.compareVersions ghc.version "9.9" >0) ''
ln -s $wrappedGhc/bin/${ghcCommand}-iserv $wrappedGhc/bin/ghc-iserv
ln -s $wrappedGhc/bin/${ghcCommand}-iserv-prof $wrappedGhc/bin/ghc-iserv-prof
''
# Wrap haddock, if the base GHC provides it.
+ ''
Expand Down
13 changes: 2 additions & 11 deletions compiler/ghc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -774,17 +774,8 @@ stdenv.mkDerivation (rec {
${hadrian}/bin/hadrian ${hadrianArgs} stage1:lib:terminfo
'' + lib.optionalString (installStage1 && !haskell-nix.haskellLib.isCrossTarget) ''
${hadrian}/bin/hadrian ${hadrianArgs} stage2:exe:iserv
${
# This work around for building `ghc-iserv-prof` does not work with the current ghc HEAD
lib.optionalString (builtins.compareVersions ghc-version "9.9" < 0)
# I don't seem to be able to build _build/stage1/lib/bin/ghc-iserv-prof
# by asking hadrian for this. The issue is likely that the profiling way
# is probably missing from hadrian m(
''
${hadrian}/bin/hadrian ${hadrianArgs} _build/stage1/lib/bin/ghc-iserv-prof
''
}
${hadrian}/bin/hadrian ${hadrianArgs} _build/stage1/${
lib.optionalString (builtins.compareVersions ghc-version "9.9" < 0) "lib/"}bin/ghc-iserv-prof
pushd _build/stage1/bin
for exe in *; do
mv $exe ${targetPrefix}$exe
Expand Down

0 comments on commit f4c9691

Please sign in to comment.