diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-07-19 20:05:22 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-10-29 19:04:22 -0400 |
commit | 539bc95184e4655cb112cb093b5c7bfd3d957f18 (patch) | |
tree | 3dc3119ebaa0766787347f3f2838c19a1dc8f60a | |
parent | 82e6bf12786908ccda643dd1dceb42abcc97290c (diff) | |
download | haskell-539bc95184e4655cb112cb093b5c7bfd3d957f18.tar.gz |
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.
(cherry picked from commit 5b39a10781da9d428bf98d934d0f82eb55054183)
-rw-r--r-- | hadrian/src/Settings/Builders/Common.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hadrian/src/Settings/Builders/Common.hs b/hadrian/src/Settings/Builders/Common.hs index 89735c7f39..350b8a4364 100644 --- a/hadrian/src/Settings/Builders/Common.hs +++ b/hadrian/src/Settings/Builders/Common.hs @@ -38,7 +38,7 @@ cIncludeArgs = do , arg $ "-I" ++ libPath , arg $ "-I" ++ path , pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir, numaIncludeDir, cursesIncludeDir] - , 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. |