From 5b39a10781da9d428bf98d934d0f82eb55054183 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 19 Jul 2021 20:05:22 -0400 Subject: hadrian: Don't add empty -I arguments Previously hadrian would add a -I$FfiIncludeDir flag to compiler invocations even if FfiIncludeDir was null, resulting in compilation errors. --- hadrian/src/Settings/Builders/Common.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadrian/src/Settings/Builders/Common.hs b/hadrian/src/Settings/Builders/Common.hs index 5421972659..dfb90a1003 100644 --- a/hadrian/src/Settings/Builders/Common.hs +++ b/hadrian/src/Settings/Builders/Common.hs @@ -35,7 +35,7 @@ cIncludeArgs = do , arg $ "-I" ++ libPath , arg $ "-I" ++ path , pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir] - , flag UseSystemFfi ? arg ("-I" ++ ffiIncludeDir) + , flag UseSystemFfi ? if not (null ffiIncludeDir) then arg ("-I" ++ ffiIncludeDir) else mempty , flag WithLibdw ? if not (null libdwIncludeDir) then arg ("-I" ++ libdwIncludeDir) else mempty -- Add @incDirs@ in the build directory, since some files generated -- with @autoconf@ may end up in the build directory. -- cgit v1.2.1