|
1 | 1 | {-# LANGUAGE DeriveGeneric #-}
|
2 | 2 | {-# LANGUAGE FlexibleContexts #-}
|
| 3 | +{-# LANGUAGE MultiWayIf #-} |
3 | 4 | {-# LANGUAGE RankNTypes #-}
|
4 | 5 | {-# LANGUAGE RecordWildCards #-}
|
5 | 6 | {-# LANGUAGE ScopedTypeVariables #-}
|
@@ -223,8 +224,27 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
|
223 | 224 | , "keep-going" -- try harder, the build will still fail if it's erroneous
|
224 | 225 | , "print-axiom-incomps" -- print more debug info for closed type families
|
225 | 226 | ]
|
| 227 | + , from |
| 228 | + [9, 2] |
| 229 | + [ "family-application-cache" |
| 230 | + ] |
| 231 | + , from |
| 232 | + [9, 6] |
| 233 | + [ "print-redundant-promotion-ticks" |
| 234 | + , "show-error-context" |
| 235 | + ] |
| 236 | + , from |
| 237 | + [9, 8] |
| 238 | + [ "unoptimized-core-for-interpreter" |
| 239 | + ] |
| 240 | + , from |
| 241 | + [9, 10] |
| 242 | + [ "diagnostics-as-json" |
| 243 | + , "print-error-index-links" |
| 244 | + , "break-points" |
| 245 | + ] |
226 | 246 | ]
|
227 |
| - , flagIn . invertibleFlagSet "-d" $ ["ppr-case-as-let", "ppr-ticks"] |
| 247 | + , flagIn $ invertibleFlagSet "-d" ["ppr-case-as-let", "ppr-ticks"] |
228 | 248 | , isOptIntFlag
|
229 | 249 | , isIntFlag
|
230 | 250 | , if safeToFilterWarnings
|
@@ -285,6 +305,7 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
|
285 | 305 | , from [8, 6] ["-dhex-word-literals"]
|
286 | 306 | , from [8, 8] ["-fshow-docs-of-hole-fits", "-fno-show-docs-of-hole-fits"]
|
287 | 307 | , from [9, 0] ["-dlinear-core-lint"]
|
| 308 | + , from [9, 10] ["-dipe-stats"] |
288 | 309 | ]
|
289 | 310 |
|
290 | 311 | isOptIntFlag :: String -> Any
|
@@ -694,7 +715,10 @@ renderGhcOptions comp _platform@(Platform _arch os) opts
|
694 | 715 | | flagProfAuto implInfo -> ["-fprof-auto-exported"]
|
695 | 716 | | otherwise -> ["-auto"]
|
696 | 717 | , ["-split-sections" | flagBool ghcOptSplitSections]
|
697 |
| - , ["-split-objs" | flagBool ghcOptSplitObjs] |
| 718 | + , case compilerCompatVersion GHC comp of |
| 719 | + -- the -split-objs flag was removed in GHC 9.8 |
| 720 | + Just ver | ver >= mkVersion [9, 8] -> [] |
| 721 | + _ -> ["-split-objs" | flagBool ghcOptSplitObjs] |
698 | 722 | , case flagToMaybe (ghcOptHPCDir opts) of
|
699 | 723 | Nothing -> []
|
700 | 724 | Just hpcdir -> ["-fhpc", "-hpcdir", hpcdir]
|
@@ -784,8 +808,7 @@ renderGhcOptions comp _platform@(Platform _arch os) opts
|
784 | 808 | -- Packages
|
785 | 809 |
|
786 | 810 | concat
|
787 |
| - [ [ case () of |
788 |
| - _ |
| 811 | + [ [ if |
789 | 812 | | unitIdSupported comp -> "-this-unit-id"
|
790 | 813 | | packageKeySupported comp -> "-this-package-key"
|
791 | 814 | | otherwise -> "-package-name"
|
|
0 commit comments