From 6578978c084d130cb0732beefeff2240466b5350 Mon Sep 17 00:00:00 2001 From: brandon s allbery kf8nh Date: Thu, 17 Oct 2024 14:58:49 -0400 Subject: [PATCH] add new non-compile-affecting options for ghc 9.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ghc 9.12 adds several new command line options, divided between `LANGUAGE`s (already added), warnings, new preprocessor control options, and compilation control options. Two options needed to be added to the list of options requiring `Int` parameters. The new options, excluding warning and language options, are: * `-fexpose-overloaded-unfoldings` * `-fmax-forced-spec-args=N` * `-fno-expose-overloaded-unfoldings` * `-fno-object-determinism` * `-fobject-determinism` * `-fwrite-if-compression=N` * `-optCmmP…` * `-optJSP…` * `-pgmCmmP` * `-pgmJSP` As they all affect compilation and store hashes, the only necessary change was to list the two numeric options so they will be parsed correctly. To the best of our understanding, `-pgm*` and `-opt*` options are already handled as a group. --- Cabal/src/Distribution/Simple/Program/GHC.hs | 1 + changelog.d/pr-10468 | 31 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 changelog.d/pr-10468 diff --git a/Cabal/src/Distribution/Simple/Program/GHC.hs b/Cabal/src/Distribution/Simple/Program/GHC.hs index ce0ea9db92a..86320cc9472 100644 --- a/Cabal/src/Distribution/Simple/Program/GHC.hs +++ b/Cabal/src/Distribution/Simple/Program/GHC.hs @@ -329,6 +329,7 @@ normaliseGhcArgs (Just ghcVersion) PackageDescription{..} ghcArgs ] , from [8, 2] ["-fmax-uncovered-patterns", "-fmax-errors"] , from [8, 4] $ to [8, 6] ["-fmax-valid-substitutions"] + , from [9, 12] ["-fmax-forced-spec-args", "-fwrite-if-compression"] ] dropIntFlag :: Bool -> String -> String -> Any diff --git a/changelog.d/pr-10468 b/changelog.d/pr-10468 new file mode 100644 index 00000000000..2b1511a609c --- /dev/null +++ b/changelog.d/pr-10468 @@ -0,0 +1,31 @@ +synopsis: Add new options from ghc 9.12 +packages: Cabal +prs: #10468 +significance: + +description: { + +- ghc 9.12 adds several new command line options, divided between + `LANGUAGE`s (already added), warnings, new preprocessor control options, + and compilation control options. Two options needed to be added to the + list of options requiring `Int` parameters. + + The new options, excluding warning and language options, are: + + * `-fexpose-overloaded-unfoldings` + * `-fmax-forced-spec-args=N` + * `-fno-expose-overloaded-unfoldings` + * `-fno-object-determinism` + * `-fobject-determinism` + * `-fwrite-if-compression=N` + * `-optCmmP…` + * `-optJSP…` + * `-pgmCmmP` + * `-pgmJSP` + + As they all affect compilation and store hashes, the only necessary + change was to list the two numeric options so they will be parsed + correctly. To the best of our understanding, `-pgm*` and `-opt*` + options are already handled as a group. + +}