[commit: hadrian] master: Switch to the fixed Cabal branch in CI and add a fix for Natural (#640) (e5773fa)

git at git.haskell.org git at git.haskell.org
Thu Jul 26 21:36:28 UTC 2018


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

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

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

commit e5773fa623331233385020b23eef3a5788e7e227
Author: Alp Mestanogullari <alpmestan at gmail.com>
Date:   Wed Jun 27 21:59:54 2018 +0200

    Switch to the fixed Cabal branch in CI and add a fix for Natural (#640)
    
    * use @quasicomputational's Cabal branch in CI for the time being
    
    * workaround can't-use-Natural-in-base


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

e5773fa623331233385020b23eef3a5788e7e227
 .travis.yml              | 7 +++++++
 appveyor.yml             | 7 +++++++
 circle.yml               | 4 ++++
 src/Settings/Packages.hs | 9 ++++++++-
 4 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index f80bca6..8416e00 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -104,6 +104,13 @@ install:
     - mv .git ghc/hadrian
     - cd ghc/hadrian && git reset --hard HEAD && cd ..
 
+    # We checkout a patched Cabal.
+    # See: https://github.com/snowleopard/hadrian/issues/634
+    - cd libraries/Cabal/
+    - git remote add quasicomputational https://github.com/quasicomputational/cabal.git
+    - git fetch quasicomputational && git checkout cwd-independent-check
+    - cd ../../
+
 cache:
     directories:
         - $HOME/.cabal
diff --git a/appveyor.yml b/appveyor.yml
index 1a18abe..a1ac6c4 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -20,6 +20,13 @@ install:
     # Copy new Hadrian into ./ghc/hadrian
     - cp -r new-hadrian ghc\hadrian
 
+    # We checkout a patched Cabal.
+    # See: https://github.com/snowleopard/hadrian/issues/634
+    - cd ghc/libraries/Cabal/
+    - git remote add quasicomputational https://github.com/quasicomputational/cabal.git
+    - git fetch quasicomputational && git checkout cwd-independent-check
+    - cd ../../../
+
     # Install Alex and Happy
     - set PATH=C:\Users\appveyor\AppData\Roaming\local\bin;%PATH%
     - ghc\hadrian\stack install --install-ghc alex happy > nul
diff --git a/circle.yml b/circle.yml
index 10b9094..998e46d 100644
--- a/circle.yml
+++ b/circle.yml
@@ -31,6 +31,10 @@ compile:
     # in CircleCI is a separate process, thus you can't "cd" for the other lines
     - cd ghc/hadrian; git reset --hard HEAD
 
+    # We checkout a patched Cabal.
+    # See: https://github.com/snowleopard/hadrian/issues/634
+    - cd ghc/libraries/Cabal/ && git remote add quasicomputational https://github.com/quasicomputational/cabal.git && git fetch quasicomputational && git checkout cwd-independent-check
+
     - cd ghc; ./boot && PATH=~/.cabal/bin:$PATH ./configure
 
     # XXX: export PATH doesn't work well either, so we use inline env
diff --git a/src/Settings/Packages.hs b/src/Settings/Packages.hs
index 6a23bb7..f1f0e61 100644
--- a/src/Settings/Packages.hs
+++ b/src/Settings/Packages.hs
@@ -27,8 +27,15 @@ packageArgs = do
 
           -- This fixes the 'unknown symbol stat' issue.
           -- See: https://github.com/snowleopard/hadrian/issues/259.
-          , builder (Ghc CompileCWithGhc) ? arg "-optc-O2" ]
+          , builder (Ghc CompileCWithGhc) ? arg "-optc-O2"
 
+          -- See https://ghc.haskell.org/trac/ghc/ticket/15286 and
+          -- https://phabricator.haskell.org/D4880
+          , builder (Ghc CompileHs) ? mconcat
+             [ input "//Natural.hs" ? pure ["-O0", "-fno-omit-interface-pragmas"]
+             , input "//Num.hs" ? pure ["-O0", "-fno-ignore-interface-pragmas"]
+             ]
+          ]
         ------------------------------ bytestring ------------------------------
         , package bytestring ?
           builder CabalFlags ? intLib == integerSimple ? arg "integer-simple"



More information about the ghc-commits mailing list