[commit: ghc] wip/angerman/llvmng: ghc-version -> ghcversion-file (777e028)

git at git.haskell.org git at git.haskell.org
Sun Nov 19 08:31:03 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/angerman/llvmng
Link       : http://ghc.haskell.org/trac/ghc/changeset/777e02860a444afa8fb49234e83201c481113c65/ghc

>---------------------------------------------------------------

commit 777e02860a444afa8fb49234e83201c481113c65
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Sun Nov 19 15:30:21 2017 +0800

    ghc-version -> ghcversion-file
    
    # Conflicts:
    #	hadrian


>---------------------------------------------------------------

777e02860a444afa8fb49234e83201c481113c65
 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 81f51e3..269017c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2205,7 +2205,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 d2b1533..0c0252c 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
@@ -1686,7 +1685,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),
@@ -2344,8 +2343,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}
 
@@ -2874,7 +2873,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