File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
cabal-install/src/Distribution/Client Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ import Distribution.Client.Utils
172172import Distribution.Client.Version
173173 ( cabalInstallGitInfo
174174 , cabalInstallVersion
175+ , cabalInstallCompilerInfo
175176 )
176177
177178import Distribution.Package (packageId )
@@ -424,6 +425,8 @@ mainWorker args = do
424425 ++ display cabalVersion
425426 ++ " of the Cabal library "
426427 ++ cabalGitInfo'
428+ ++ " \n with "
429+ ++ cabalInstallCompilerInfo
427430 where
428431 cabalGitInfo'
429432 | cabalGitInfo == cabalInstallGitInfo = " (in-tree)"
Original file line number Diff line number Diff line change 77module Distribution.Client.Version
88 ( cabalInstallVersion
99 , cabalInstallGitInfo
10+ , cabalInstallCompilerInfo
1011 ) where
1112
13+ import Data.List (intercalate )
14+ import qualified Data.Version as DV
15+ import qualified System.Info as SI
1216import Distribution.Version
1317
1418import qualified Paths_cabal_install as PackageInfo
@@ -28,9 +32,27 @@ import GitHash
2832cabalInstallVersion :: Version
2933cabalInstallVersion = mkVersion' PackageInfo. version
3034
35+ -- |
36+ -- `cabal-install` compiler information.
37+ cabalInstallCompilerInfo :: String
38+ cabalInstallCompilerInfo = let ci =
39+ #if MIN_VERSION_base(4,15,0)
40+ SI. fullCompilerVersion
41+ #else
42+ SI. compilerVersion
43+ #endif
44+ in concat [ SI. compilerName
45+ , " "
46+ , intercalate " ." (map show (DV. versionBranch ci))
47+ , " on "
48+ , SI. os
49+ , " "
50+ , SI. arch
51+ ]
52+
3153-- |
3254-- `cabal-install` Git information. Only filled in if built in a Git tree in
33- -- developmnent mode and Template Haskell is available.
55+ -- development mode and Template Haskell is available.
3456cabalInstallGitInfo :: String
3557#ifdef GIT_REV
3658cabalInstallGitInfo = if giHash' == " "
You can’t perform that action at this time.
0 commit comments