Skip to content

Commit c56e35a

Browse files
committed
Fix libraryDynDirSupported version test to handle buggy GHC 8.1.
Signed-off-by: Edward Z. Yang <[email protected]>
1 parent b736896 commit c56e35a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Cabal/Distribution/Simple/Compiler.hs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,14 @@ backpackSupported = ghcSupported "Support Backpack"
329329
-- "dynamic-library-dirs"?
330330
libraryDynDirSupported :: Compiler -> Bool
331331
libraryDynDirSupported comp = case compilerFlavor comp of
332-
GHC -> compilerVersion comp >= mkVersion [8,0,1,20161021]
332+
GHC ->
333+
-- Not just v >= mkVersion [8,0,1,20161021], as there
334+
-- are many GHC 8.1 nightlies which don't support this.
335+
((v >= mkVersion [8,0,1,20161021] && v < mkVersion [8,1]) ||
336+
v >= mkVersion [8,1,20161021])
333337
_ -> False
338+
where
339+
v = compilerVersion comp
334340

335341
-- | Does this compiler support Haskell program coverage?
336342
coverageSupported :: Compiler -> Bool

0 commit comments

Comments
 (0)