Commit ad46306f authored by Oleg Grenrus's avatar Oleg Grenrus

Resolve #6904: Update normaliseGhcArgs for GHC-8.12

parent 753e0062
......@@ -55,7 +55,7 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
supportedGHCVersions :: VersionRange
supportedGHCVersions = intersectVersionRanges
(orLaterVersion (mkVersion [8,0]))
(earlierVersion (mkVersion [8,11]))
(earlierVersion (mkVersion [8,13]))
from :: Monoid m => [Int] -> m -> m
from version flags
......@@ -237,6 +237,7 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs
, from [8,4] $ to [8,6] [ "-fno-max-valid-substitutions" ]
, from [8,6] [ "-dhex-word-literals" ]
, from [8,8] [ "-fshow-docs-of-hole-fits", "-fno-show-docs-of-hole-fits" ]
, from [8,12] [ "-dlinear-core-lint" ]
]
isOptIntFlag :: String -> Any
......
......@@ -19,6 +19,7 @@ tests = testGroup "Distribution.Simple.Program.GHC"
options_8_8_all
assertListEquals flags options_8_8_affects
, testCase "options added in GHC-8.10" $ do
let flags :: [String]
flags = normaliseGhcArgs
......@@ -27,6 +28,15 @@ tests = testGroup "Distribution.Simple.Program.GHC"
options_8_10_all
assertListEquals flags options_8_10_affects
, testCase "options added in GHC-8.12" $ do
let flags :: [String]
flags = normaliseGhcArgs
(Just $ mkVersion [8,12,1])
emptyPackageDescription
options_8_12_all
assertListEquals flags options_8_12_affects
]
]
......@@ -140,3 +150,23 @@ options_8_10_affects =
, "-include-cpp-deps"
, "-optcxx"
]
-------------------------------------------------------------------------------
-- GHC-8.12
-------------------------------------------------------------------------------
options_8_12_all :: [String]
options_8_12_all =
[ "-ddump-cmm-opt"
, "-ddump-cpranal"
, "-ddump-cpr-signatures"
, "-ddump-hie"
-- NOTE: we filter out -dlinear-core-lint
-- we filter, -dcore-lint, -dstg-lint etc.
, "-dlinear-core-lint"
] ++ options_8_12_affects
options_8_12_affects :: [String]
options_8_12_affects =
[ "-fcmm-static-pred"
]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment