diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2017-11-19 22:11:43 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-11-19 22:11:55 -0500 |
commit | ca3700ab232207d946b47bd751e666f7aa3d21cb (patch) | |
tree | 9da3c171c527e44d690451659ff10458c2245fd7 | |
parent | 7d16d8a20d5ba6ca38c0fdf5732e3edaa6b14827 (diff) | |
download | haskell-ca3700ab232207d946b47bd751e666f7aa3d21cb.tar.gz |
Rename ghc-version -> ghcversion-file
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4210
-rw-r--r-- | compiler/main/DriverPipeline.hs | 2 | ||||
-rw-r--r-- | compiler/main/DynFlags.hs | 11 | ||||
-rw-r--r-- | 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 4f7bfbda5c..f07f4e8ef4 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 04ac6356f6..cbf3ab7622 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 e3fa74127e..d5544e4c57 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 |