[commit: ghc] master: Rename ghc-version -> ghcversion-file (ca3700a)
git at git.haskell.org
git at git.haskell.org
Mon Nov 20 04:35:54 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/ca3700ab232207d946b47bd751e666f7aa3d21cb/ghc
>---------------------------------------------------------------
commit ca3700ab232207d946b47bd751e666f7aa3d21cb
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date: Sun Nov 19 22:11:43 2017 -0500
Rename ghc-version -> ghcversion-file
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4210
>---------------------------------------------------------------
ca3700ab232207d946b47bd751e666f7aa3d21cb
compiler/main/DriverPipeline.hs | 2 +-
compiler/main/DynFlags.hs | 11 +++++------
docs/users_guide/using.rst | 2 +-
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 4f7bfbd..f07f4e8 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2204,7 +2204,7 @@ touchObjectFile dflags path = do
-- | Find out path to @ghcversion.h@ file
getGhcVersionPathName :: DynFlags -> IO FilePath
getGhcVersionPathName dflags = do
- candidates <- case ghcVersion dflags of
+ candidates <- case ghcVersionFile dflags of
Just path -> return [path]
Nothing -> (map (</> "ghcversion.h")) <$>
(getPackageIncludePath dflags [toInstalledUnitId rtsUnitId])
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 04ac635..cbf3ab7 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -534,7 +534,6 @@ data GeneralFlag
| Opt_ExternalInterpreter
| Opt_OptimalApplicativeDo
| Opt_VersionMacros
- | Opt_GhcVersion
| Opt_WholeArchiveHsLibs
-- PreInlining is on by default. The option is there just to see how
@@ -918,7 +917,7 @@ data DynFlags = DynFlags {
flushOut :: FlushOut,
flushErr :: FlushErr,
- ghcVersion :: Maybe FilePath,
+ ghcVersionFile :: Maybe FilePath,
haddockOptions :: Maybe String,
-- | GHCi scripts specified by -ghci-script, in reverse order
@@ -1684,7 +1683,7 @@ defaultDynFlags mySettings myLlvmTargets =
filesToClean = panic "defaultDynFlags: No filesToClean",
dirsToClean = panic "defaultDynFlags: No dirsToClean",
generatedDumps = panic "defaultDynFlags: No generatedDumps",
- ghcVersion = Nothing,
+ ghcVersionFile = Nothing,
haddockOptions = Nothing,
dumpFlags = EnumSet.empty,
generalFlags = EnumSet.fromList (defaultFlags mySettings),
@@ -2342,8 +2341,8 @@ addDepSuffix s d = d { depSuffixes = s : depSuffixes d }
addCmdlineFramework f d = d { cmdlineFrameworks = f : cmdlineFrameworks d}
-addGhcVersion :: FilePath -> DynFlags -> DynFlags
-addGhcVersion f d = d { ghcVersion = Just f }
+addGhcVersionFile :: FilePath -> DynFlags -> DynFlags
+addGhcVersionFile f d = d { ghcVersionFile = Just f }
addHaddockOpts f d = d { haddockOptions = Just f}
@@ -2872,7 +2871,7 @@ dynamic_flags_deps = [
, make_ord_flag defGhcFlag "no-rtsopts-suggestions"
(noArg (\d -> d {rtsOptsSuggestions = False}))
- , make_ord_flag defGhcFlag "ghc-version" (hasArg addGhcVersion)
+ , make_ord_flag defGhcFlag "ghcversion-file" (hasArg addGhcVersionFile)
, make_ord_flag defGhcFlag "main-is" (SepArg setMainIs)
, make_ord_flag defGhcFlag "haddock" (NoArg (setGeneralFlag Opt_Haddock))
, make_ord_flag defGhcFlag "haddock-opts" (hasArg addHaddockOpts)
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index e3fa741..d5544e4 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -1073,7 +1073,7 @@ Miscellaneous flags
Some flags only make sense for a particular use case.
-.. ghc-flag:: -ghc-version ⟨path to ghcversion.h⟩
+.. ghc-flag:: -ghcversion-file ⟨path to ghcversion.h⟩
:shortdesc: (GHC as a C compiler only) Use this ``ghcversion.h`` file
:type: dynamic
:category: misc
More information about the ghc-commits
mailing list