summaryrefslogtreecommitdiff
path: root/hadrian/src/Rules/BinaryDist.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-11-22 11:47:27 -0500
committerBen Gamari <ben@smart-cactus.org>2018-11-22 13:14:01 -0500
commit19ffddc1f479fcd5a0f265330cc1041366e8c43d (patch)
tree1a16b99032731e327219a001aa2cd76c3cf136f8 /hadrian/src/Rules/BinaryDist.hs
parent676f1f2d2eb39740fe5d88e72f6aa8e89cb0ebc0 (diff)
downloadhaskell-19ffddc1f479fcd5a0f265330cc1041366e8c43d.tar.gz
Hadrian: work around Cabal's/GHC's different Arch/OS strings
The path to the 'include' subdirectory of 'rts' includes a folder that whose name is generated by Cabal and mentiones the architecture and OS. For example: _build/stage1/lib/x86_64-osx-ghc-8.7.20181120/rts-1.0/include Hadrian needs to be aware that Cabal renders architectures and OSes in a slightly different way than GHC. There is already symmetric logic in Cabal (for working with GHC environment files, which follow GHC's naming conventions). Test Plan: ./hadrian/build.sh -c "binary-dist" # on mac Reviewers: snowleopard, alpmestan, bgamari Reviewed By: snowleopard Subscribers: rwbarton, carter GHC Trac Issues: #15922 Differential Revision: https://phabricator.haskell.org/D5361
Diffstat (limited to 'hadrian/src/Rules/BinaryDist.hs')
-rw-r--r--hadrian/src/Rules/BinaryDist.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index f0aeb4b827..667fbf1454 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -19,14 +19,14 @@ bindistRules = do
need targets
version <- setting ProjectVersion
targetPlatform <- setting TargetPlatformFull
- hostOs <- setting BuildOs
- hostArch <- setting BuildArch
+ cabalHostOs <- cabalOsString <$> setting BuildOs
+ cabalHostArch <- cabalArchString <$> setting BuildArch
rtsDir <- pkgIdentifier rts
let ghcBuildDir = root -/- stageString Stage1
bindistFilesDir = root -/- "bindist" -/- ghcVersionPretty
ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform
- distDir = hostArch ++ "-" ++ hostOs ++ "-ghc-" ++ version
+ distDir = cabalHostArch ++ "-" ++ cabalHostOs ++ "-ghc-" ++ version
rtsIncludeDir = ghcBuildDir -/- "lib" -/- distDir -/- rtsDir
-/- "include"