summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hadrian/src/Rules/BinaryDist.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index 6b1bad005c..589c0e95fb 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -6,6 +6,7 @@ import CommandLine
import Context
import Expression
import Oracles.Setting
+import Oracles.Flag
import Packages
import Settings
import Settings.Program (programContext)
@@ -114,8 +115,9 @@ bindistRules = do
phony "binary-dist-dir" $ do
-- We 'need' all binaries and libraries
targets <- mapM pkgTarget =<< stagePackages Stage1
+ cross <- flag CrossCompiling
need targets
- needIservBins
+ unless cross $ needIservBins
version <- setting ProjectVersion
targetPlatform <- setting TargetPlatformFull
@@ -134,7 +136,7 @@ bindistRules = do
copyDirectory (ghcBuildDir -/- "bin") bindistFilesDir
copyDirectory (ghcBuildDir -/- "lib") bindistFilesDir
copyDirectory (rtsIncludeDir) bindistFilesDir
- need ["docs"]
+ unless cross $ need ["docs"]
-- TODO: we should only embed the docs that have been generated
-- depending on the current settings (flavours' "ghcDocs" field and
-- "--docs=.." command-line flag)
@@ -151,9 +153,10 @@ bindistRules = do
-- We copy the binary (<build root>/stage1/bin/haddock[.exe]) to
-- the bindist's bindir (<build root>/bindist/ghc-.../bin/).
- haddockPath <- programPath (vanillaContext Stage1 haddock)
- copyFile haddockPath
- (bindistFilesDir -/- "bin" -/- takeFileName haddockPath)
+ unless cross $ do
+ haddockPath <- programPath (vanillaContext Stage1 haddock)
+ copyFile haddockPath
+ (bindistFilesDir -/- "bin" -/- takeFileName haddockPath)
-- We then 'need' all the files necessary to configure and install
-- (as in, './configure [...] && make install') this build on some