summaryrefslogtreecommitdiff
path: root/hadrian/src
diff options
context:
space:
mode:
authorAlp Mestanogullari <alpmestan@gmail.com>2020-01-17 11:15:26 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-09 02:54:28 -0500
commit3ae83da13f03d22a4d810b5d9c0f37f818cb6a00 (patch)
tree5b96251bc82f06fb42dfe5208800368db5e6e845 /hadrian/src
parenta906595f060b9c038332f16adaf664eeb1d50f2e (diff)
downloadhaskell-3ae83da13f03d22a4d810b5d9c0f37f818cb6a00.tar.gz
hadrian: Windows fixes (bindists, CI)
This commit implements a few Windows-specific fixes which get us from a CI job that can't even get as far as starting the testsuite driver, to a state where we can run the entire testssuite (but have test failures to fix). - Don't forget about a potential extension for the haddock program, when preparing the bindist. - Build the timeout program, used by the testsuite driver on Windows in place of the Python script used elsewhere, using the boot compiler. We could alternatively build it with the compiler that we're going to test but this would be a lot more tedious to write. - Implement a wrapper-script less installation procedure for Windows, in `hadrian/bindist/Makefile. - Make dependencies a bit more accurate in the aforementioned Makefile. - Update Windows/Hadrian CI job accordingly. This patch fixes #17486.
Diffstat (limited to 'hadrian/src')
-rw-r--r--hadrian/src/Rules/BinaryDist.hs5
-rw-r--r--hadrian/src/Rules/Test.hs10
-rw-r--r--hadrian/src/Settings/Default.hs1
3 files changed, 9 insertions, 7 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index 42efb95420..8ec3ea137d 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -136,10 +136,11 @@ bindistRules = do
-- shipping it
removeFile (bindistFilesDir -/- mingwStamp)
- -- We copy the binary (<build root>/stage1/bin/haddock) to
+ -- 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" -/- "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
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index 71e2f48271..3c821adf53 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -140,7 +140,7 @@ timeoutProgBuilder = do
root <- buildRoot
if windowsHost
then do
- prog <- programPath =<< programContext Stage1 timeout
+ prog <- programPath =<< programContext Stage0 timeout
copyFile prog (root -/- timeoutPath)
else do
python <- builderPath Python
@@ -154,12 +154,12 @@ timeoutProgBuilder = do
needTestBuilders :: Action ()
needTestBuilders = do
testGhc <- testCompiler <$> userSetting defaultTestArgs
- when (testGhc `elem` ["stage1", "stage2", "stage3"]) needTestsuitePackages
+ when (testGhc `elem` ["stage1", "stage2", "stage3"])
+ (needTestsuitePackages testGhc)
-- | Build extra programs and libraries required by testsuite
-needTestsuitePackages :: Action ()
-needTestsuitePackages = do
- testGhc <- testCompiler <$> userSetting defaultTestArgs
+needTestsuitePackages :: String -> Action ()
+needTestsuitePackages testGhc = do
when (testGhc `elem` ["stage1", "stage2", "stage3"]) $ do
let stg = stageOf testGhc
allpkgs <- packages <$> flavour
diff --git a/hadrian/src/Settings/Default.hs b/hadrian/src/Settings/Default.hs
index 5bf9ea7e7c..aeac1434db 100644
--- a/hadrian/src/Settings/Default.hs
+++ b/hadrian/src/Settings/Default.hs
@@ -76,6 +76,7 @@ stage0Packages = do
, transformers
, unlit ]
++ [ terminfo | not windowsHost, not cross ]
+ ++ [ timeout | windowsHost ]
++ [ touchy | windowsHost ]
-- | Packages built in 'Stage1' by default. You can change this in "UserSettings".