Skip to content
Snippets Groups Projects
Unverified Commit df3dc72c authored by Ben Gamari's avatar Ben Gamari Committed by Zubin
Browse files

hadrian: Drop redundant include directories

The package-specific include directories in
Settings.Builders.Common.cIncludeDirs are now redundant since they now
come from Cabal.

Closes #20566.

(cherry picked from commit 53cc93ae)
parent 9195bded
No related branches found
No related tags found
No related merge requests found
......@@ -26,20 +26,10 @@ cIncludeArgs = do
incDirs <- getContextData includeDirs
depDirs <- getContextData depIncludeDirs
stage <- getStage
-- TODO: Why is any of this necessary? We should have already told Cabal about these paths.
iconvIncludeDir <- getSetting IconvIncludeDir
gmpIncludeDir <- getSetting GmpIncludeDir
ffiIncludeDir <- getSetting FfiIncludeDir
libdwIncludeDir <- getSetting LibdwIncludeDir
numaIncludeDir <- getSetting LibnumaIncludeDir
cursesIncludeDir <- getSetting CursesIncludeDir
libPath <- expr $ stageLibPath stage
mconcat [ notStage0 ||^ package compiler ? arg "-Iincludes"
, arg $ "-I" ++ libPath
, arg $ "-I" ++ path
, pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir, numaIncludeDir, cursesIncludeDir]
, flag UseSystemFfi ? not (null ffiIncludeDir) ? arg ("-I" ++ ffiIncludeDir)
, flag WithLibdw ? not (null libdwIncludeDir) ? arg ("-I" ++ libdwIncludeDir)
-- Add @incDirs@ in the build directory, since some files generated
-- with @autoconf@ may end up in the build directory.
, pure [ "-I" ++ path -/- dir | dir <- incDirs ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment