[commit: hadrian] master: Do not always add -Iincludes to C arguments (#610) (ec5e9d3)
git at git.haskell.org
git at git.haskell.org
Fri Jun 8 00:02:33 UTC 2018
Repository : ssh://git@git.haskell.org/hadrian
On branch : master
Link : http://git.haskell.org/hadrian.git/commitdiff/ec5e9d3acdf9ca5ae0e5808ad6f510e9167f2552
>---------------------------------------------------------------
commit ec5e9d3acdf9ca5ae0e5808ad6f510e9167f2552
Author: Alp Mestanogullari <alpmestan at gmail.com>
Date: Wed Jun 6 22:26:13 2018 +0200
Do not always add -Iincludes to C arguments (#610)
>---------------------------------------------------------------
ec5e9d3acdf9ca5ae0e5808ad6f510e9167f2552
src/Settings/Builders/Common.hs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Settings/Builders/Common.hs b/src/Settings/Builders/Common.hs
index 1995c66..ae660db 100644
--- a/src/Settings/Builders/Common.hs
+++ b/src/Settings/Builders/Common.hs
@@ -11,6 +11,7 @@ module Settings.Builders.Common (
import Base
import Expression
+import GHC.Packages
import Hadrian.Haskell.Cabal.PackageData
import Oracles.Flag
import Oracles.Setting
@@ -27,7 +28,7 @@ cIncludeArgs = do
iconvIncludeDir <- getSetting IconvIncludeDir
gmpIncludeDir <- getSetting GmpIncludeDir
ffiIncludeDir <- getSetting FfiIncludeDir
- mconcat [ arg "-Iincludes"
+ mconcat [ notStage0 ||^ package compiler ? arg "-Iincludes"
, arg $ "-I" ++ root -/- generatedDir
, arg $ "-I" ++ path
, pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir]
More information about the ghc-commits
mailing list