[commit: ghc] wip/nfs-locking: Add path to generated includes for compiler package (57d6c69)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:40:09 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/57d6c69843a0c2f7fd89a0c9cbc49742c6347414/ghc

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

commit 57d6c69843a0c2f7fd89a0c9cbc49742c6347414
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Sep 25 01:29:46 2016 +0900

    Add path to generated includes for compiler package
    
    Fix #288.


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

57d6c69843a0c2f7fd89a0c9cbc49742c6347414
 src/Settings/Builders/Common.hs   | 2 +-
 src/Settings/Packages/Compiler.hs | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/Settings/Builders/Common.hs b/src/Settings/Builders/Common.hs
index d036f8a..b276102 100644
--- a/src/Settings/Builders/Common.hs
+++ b/src/Settings/Builders/Common.hs
@@ -1,5 +1,5 @@
 module Settings.Builders.Common (
-    includesArgs, cIncludeArgs, ldArgs, cArgs, cWarnings,
+    includes, includesArgs, cIncludeArgs, ldArgs, cArgs, cWarnings,
     argSetting, argSettingList, argStagedBuilderPath, argStagedSettingList
     ) where
 
diff --git a/src/Settings/Packages/Compiler.hs b/src/Settings/Packages/Compiler.hs
index 7dbbaa3..65ced17 100644
--- a/src/Settings/Packages/Compiler.hs
+++ b/src/Settings/Packages/Compiler.hs
@@ -7,6 +7,7 @@ import Oracles.Config.Flag
 import Oracles.Config.Setting
 import Predicate
 import Settings
+import Settings.Builders.Common
 
 compilerPackageArgs :: Args
 compilerPackageArgs = package compiler ? do
@@ -15,7 +16,10 @@ compilerPackageArgs = package compiler ? do
     path    <- getBuildPath
     mconcat [ builder Alex ? arg "--latin1"
 
-            , builder Ghc ? arg ("-I" ++ path)
+            , builder Ghc ? mconcat
+              [ arg ("-I" ++ path)
+              , includesArgs
+              , append [ "-optP-I" ++ dir | dir <- includes ] ]
 
             , builder GhcCabal ? mconcat
               [ arg $ "--ghc-option=-DSTAGE=" ++ show (fromEnum stage + 1)



More information about the ghc-commits mailing list