diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-07-19 20:05:22 -0400 |
---|---|---|
committer | Ben Gamari <ben@well-typed.com> | 2021-07-25 17:30:52 +0000 |
commit | 5b39a10781da9d428bf98d934d0f82eb55054183 (patch) | |
tree | 4a3ec79c25b08e1ec8df0dc00ce0e643f1930683 | |
parent | 1832676aba0a5d75ac934a62eff55e35f95587d5 (diff) | |
download | haskell-5b39a10781da9d428bf98d934d0f82eb55054183.tar.gz |
hadrian: Don't add empty -I argumentswip/hadrian/libffi-includes
Previously hadrian would add a -I$FfiIncludeDir flag to compiler
invocations even if FfiIncludeDir was null, resulting in compilation
errors.
-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 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. |