[commit: hadrian] master: Add extra include paths when invoking ghc-cabal (#526) (7a5ee60)

git at git.haskell.org git at git.haskell.org
Wed Apr 25 23:20:16 UTC 2018


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

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

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

commit 7a5ee60910cc3571d5f4b6f90f9818367ad71f97
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Mar 14 19:34:29 2018 +0000

    Add extra include paths when invoking ghc-cabal (#526)
    
    See #523


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

7a5ee60910cc3571d5f4b6f90f9818367ad71f97
 src/Settings/Builders/GhcCabal.hs | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/Settings/Builders/GhcCabal.hs b/src/Settings/Builders/GhcCabal.hs
index bfb84a7..78b4587 100644
--- a/src/Settings/Builders/GhcCabal.hs
+++ b/src/Settings/Builders/GhcCabal.hs
@@ -56,13 +56,17 @@ configureArgs :: Args
 configureArgs = do
     top  <- expr topDirectory
     root <- getBuildRoot
+    pkg  <- getPackage
     let conf key expr = do
             values <- unwords <$> expr
             not (null values) ?
                 arg ("--configure-option=" ++ key ++ "=" ++ values)
         cFlags   = mconcat [ remove ["-Werror"] cArgs
                            , getStagedSettingList ConfCcArgs
-                           , arg $ "-I" ++ top -/- root -/- generatedDir ]
+                           , arg $ "-I" ++ top -/- root -/- generatedDir
+                           -- See https://github.com/snowleopard/hadrian/issues/523
+                           , arg $ "-I" ++ top -/- pkgPath pkg
+                           , arg $ "-I" ++ top -/- "includes" ]
         ldFlags  = ldArgs  <> (getStagedSettingList ConfGccLinkerArgs)
         cppFlags = cppArgs <> (getStagedSettingList ConfCppArgs)
     cldFlags <- unwords <$> (cFlags <> ldFlags)



More information about the ghc-commits mailing list