diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-10-29 19:05:32 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-01 03:09:21 -0500 |
commit | 91d1a773891e4b9fdb8d1d4f0bc4d6426d76b7cf (patch) | |
tree | 4b75b776ed66abd3cc9c057e69d0aac5ae6a966e | |
parent | 7bdca2ba9802e5c1c334b2cd23e6cc2010a79346 (diff) | |
download | haskell-91d1a773891e4b9fdb8d1d4f0bc4d6426d76b7cf.tar.gz |
hadrian: Don't pass empty paths via -I
Previously we could in some cases add empty paths to `cc`'s include file
search path. See #20578.
-rw-r--r-- | hadrian/src/Settings/Packages.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index ed5a03a2d9..6fc47b05fd 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -277,8 +277,8 @@ rtsPackageArgs = package rts ? do let cArgs = mconcat [ rtsWarnings - , flag UseSystemFfi ? arg ("-I" ++ ffiIncludeDir) - , flag WithLibdw ? arg ("-I" ++ libdwIncludeDir) + , flag UseSystemFfi ? not (null ffiIncludeDir) ? arg ("-I" ++ ffiIncludeDir) + , flag WithLibdw ? not (null libdwIncludeDir) ? arg ("-I" ++ libdwIncludeDir) , arg "-fomit-frame-pointer" -- RTS *must* be compiled with optimisations. The INLINE_HEADER macro -- requires that functions are inlined to work as expected. Inlining |