From df3dc72cafc045db80ef9cf4f510e943f883f91a Mon Sep 17 00:00:00 2001 From: Ben Gamari <ben@smart-cactus.org> Date: Wed, 1 Dec 2021 12:37:45 -0500 Subject: [PATCH] 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 53cc93ae3c9b939fff8407ee588dff89f7f92a12) --- hadrian/src/Settings/Builders/Common.hs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hadrian/src/Settings/Builders/Common.hs b/hadrian/src/Settings/Builders/Common.hs index 47e3a7db997f..1ea4082502a5 100644 --- a/hadrian/src/Settings/Builders/Common.hs +++ b/hadrian/src/Settings/Builders/Common.hs @@ -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 ] -- GitLab