[commit: hadrian] master: Fix AppVeyor (#577) (9110813)

git at git.haskell.org git at git.haskell.org
Wed Apr 25 23:21:10 UTC 2018


Repository : ssh://git@git.haskell.org/hadrian

On branch  : master
Link       : http://git.haskell.org/hadrian.git/commitdiff/911081374f58514e76520ae755614c5a0000073c

>---------------------------------------------------------------

commit 911081374f58514e76520ae755614c5a0000073c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Apr 18 01:34:10 2018 +0100

    Fix AppVeyor (#577)
    
    * Copy inplace/mingw to the build root
    
    * Run Hadrian with -c on AppVeyor


>---------------------------------------------------------------

911081374f58514e76520ae755614c5a0000073c
 appveyor.yml           | 8 ++------
 src/Rules/Configure.hs | 8 +++++++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 85bfee8..1a18abe 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -30,13 +30,9 @@ install:
     - appveyor-retry stack exec -- pacman -S autoconf automake-wrapper make patch python3 tar --noconfirm
 
 build_script:
-    # Boot and configure ghc source tree
-    - cd ..
-    - hadrian\stack exec -- python3 boot
-    - hadrian\stack exec -- bash configure --enable-distro-toolchain
-
     # Build GHC
-    - hadrian\build -j --flavour=quickest --integer-simple --no-progress --progress-colour=never --profile=-
+    - cd ..
+    - hadrian\build -c -j --flavour=quickest --integer-simple --no-progress --progress-colour=never --profile=-
 
     # Test GHC binary
     - _build\stage1\bin\ghc -e 1+2
diff --git a/src/Rules/Configure.hs b/src/Rules/Configure.hs
index 1fd07de..050d7f3 100644
--- a/src/Rules/Configure.hs
+++ b/src/Rules/Configure.hs
@@ -12,7 +12,7 @@ import Utilities
 
 configureRules :: Rules ()
 configureRules = do
-    -- TODO: consider other files we should track here (rts/rts.cabal etc)
+    -- TODO: consider other files we should track here, e.g. @rts/rts.cabal at .
     [configFile, "settings", configH, "compiler/ghc.cabal"] &%> \outs -> do
         skip <- not <$> cmdConfigure
         if skip
@@ -29,6 +29,12 @@ configureRules = do
                 context = vanillaContext Stage0 compiler
             need srcs
             build $ target context (Configure ".") srcs outs
+            -- We need to copy the directory with unpacked Windows tarball to
+            -- the build directory, so that the built GHC has access to it.
+            -- See https://github.com/snowleopard/hadrian/issues/564.
+            when System.isWindows $ do
+                root <- buildRoot
+                copyDirectory "inplace/mingw" (root -/- "mingw")
 
     ["configure", configH <.> "in"] &%> \_ -> do
         skip <- not <$> cmdConfigure



More information about the ghc-commits mailing list