|
1 | 1 | {-# LANGUAGE DataKinds #-}
|
2 | 2 | {-# LANGUAGE DeriveGeneric #-}
|
3 | 3 | {-# LANGUAGE FlexibleContexts #-}
|
| 4 | +{-# LANGUAGE MultiWayIf #-} |
4 | 5 | {-# LANGUAGE RankNTypes #-}
|
5 | 6 | {-# LANGUAGE RecordWildCards #-}
|
6 | 7 | {-# LANGUAGE ScopedTypeVariables #-}
|
@@ -227,8 +228,27 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
|
227 | 228 | , "keep-going" -- try harder, the build will still fail if it's erroneous
|
228 | 229 | , "print-axiom-incomps" -- print more debug info for closed type families
|
229 | 230 | ]
|
| 231 | + , from |
| 232 | + [9, 2] |
| 233 | + [ "family-application-cache" |
| 234 | + ] |
| 235 | + , from |
| 236 | + [9, 6] |
| 237 | + [ "print-redundant-promotion-ticks" |
| 238 | + , "show-error-context" |
| 239 | + ] |
| 240 | + , from |
| 241 | + [9, 8] |
| 242 | + [ "unoptimized-core-for-interpreter" |
| 243 | + ] |
| 244 | + , from |
| 245 | + [9, 10] |
| 246 | + [ "diagnostics-as-json" |
| 247 | + , "print-error-index-links" |
| 248 | + , "break-points" |
| 249 | + ] |
230 | 250 | ]
|
231 |
| - , flagIn . invertibleFlagSet "-d" $ ["ppr-case-as-let", "ppr-ticks"] |
| 251 | + , flagIn $ invertibleFlagSet "-d" ["ppr-case-as-let", "ppr-ticks"] |
232 | 252 | , isOptIntFlag
|
233 | 253 | , isIntFlag
|
234 | 254 | , if safeToFilterWarnings
|
@@ -289,6 +309,7 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
|
289 | 309 | , from [8, 6] ["-dhex-word-literals"]
|
290 | 310 | , from [8, 8] ["-fshow-docs-of-hole-fits", "-fno-show-docs-of-hole-fits"]
|
291 | 311 | , from [9, 0] ["-dlinear-core-lint"]
|
| 312 | + , from [9, 10] ["-dipe-stats"] |
292 | 313 | ]
|
293 | 314 |
|
294 | 315 | isOptIntFlag :: String -> Any
|
@@ -709,7 +730,10 @@ renderGhcOptions comp _platform@(Platform _arch os) opts
|
709 | 730 | | flagProfAuto implInfo -> ["-fprof-auto-exported"]
|
710 | 731 | | otherwise -> ["-auto"]
|
711 | 732 | , ["-split-sections" | flagBool ghcOptSplitSections]
|
712 |
| - , ["-split-objs" | flagBool ghcOptSplitObjs] |
| 733 | + , case compilerCompatVersion GHC comp of |
| 734 | + -- the -split-objs flag was removed in GHC 9.8 |
| 735 | + Just ver | ver >= mkVersion [9, 8] -> [] |
| 736 | + _ -> ["-split-objs" | flagBool ghcOptSplitObjs] |
713 | 737 | , case flagToMaybe (ghcOptHPCDir opts) of
|
714 | 738 | Nothing -> []
|
715 | 739 | Just hpcdir -> ["-fhpc", "-hpcdir", u hpcdir]
|
@@ -799,8 +823,7 @@ renderGhcOptions comp _platform@(Platform _arch os) opts
|
799 | 823 | -- Packages
|
800 | 824 |
|
801 | 825 | concat
|
802 |
| - [ [ case () of |
803 |
| - _ |
| 826 | + [ [ if |
804 | 827 | | unitIdSupported comp -> "-this-unit-id"
|
805 | 828 | | packageKeySupported comp -> "-this-package-key"
|
806 | 829 | | otherwise -> "-package-name"
|
|
0 commit comments