Skip to content

Commit c674aed

Browse files
committed
Include the compiler ABI hash in the package hash
This complements the previous commit in order to fix #9326
1 parent 54228c3 commit c674aed

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Cabal/src/Distribution/Simple/GHC.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ module Distribution.Simple.GHC
8282
import Distribution.Compat.Prelude
8383
import Prelude ()
8484

85-
import Control.Monad (forM_, msum)
85+
import Control.Monad (forM_)
8686
import Data.List (stripPrefix)
8787
import qualified Data.Map as Map
8888
import Distribution.CabalSpecVersion

cabal-install/src/Distribution/Client/PackageHash.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
-- * the package tarball
1111
-- * the ids of all the direct dependencies
1212
-- * other local configuration (flags, profiling, etc)
13+
--
14+
-- See 'PackageHashInputs' for a detailed list of what determines the hash.
1315
module Distribution.Client.PackageHash
1416
( -- * Calculating package hashes
1517
PackageHashInputs (..)
@@ -38,7 +40,8 @@ import Distribution.Package
3840
, mkComponentId
3941
)
4042
import Distribution.Simple.Compiler
41-
( CompilerId
43+
( AbiTag (..)
44+
, CompilerId
4245
, DebugInfoLevel (..)
4346
, OptimisationLevel (..)
4447
, PackageDB
@@ -191,6 +194,7 @@ type PackageSourceHash = HashValue
191194
-- package hash.
192195
data PackageHashConfigInputs = PackageHashConfigInputs
193196
{ pkgHashCompilerId :: CompilerId
197+
, pkgHashCompilerABI :: AbiTag
194198
, pkgHashPlatform :: Platform
195199
, pkgHashFlagAssignment :: FlagAssignment -- complete not partial
196200
, pkgHashConfigureScriptArgs :: [String] -- just ./configure for build-type Configure
@@ -301,6 +305,7 @@ renderPackageHashInputs
301305
pkgHashDirectDeps
302306
, -- and then all the config
303307
entry "compilerid" prettyShow pkgHashCompilerId
308+
, entry "compilerabi" prettyShow pkgHashCompilerABI
304309
, entry "platform" prettyShow pkgHashPlatform
305310
, opt "flags" mempty showFlagAssignment pkgHashFlagAssignment
306311
, opt "configure-script" [] unwords pkgHashConfigureScriptArgs

cabal-install/src/Distribution/Client/ProjectPlanning.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4303,6 +4303,7 @@ packageHashConfigInputs
43034303
packageHashConfigInputs shared@ElaboratedSharedConfig{..} pkg =
43044304
PackageHashConfigInputs
43054305
{ pkgHashCompilerId = compilerId pkgConfigCompiler
4306+
, pkgHashCompilerABI = compilerAbiTag pkgConfigCompiler
43064307
, pkgHashPlatform = pkgConfigPlatform
43074308
, pkgHashFlagAssignment = elabFlagAssignment
43084309
, pkgHashConfigureScriptArgs = elabConfigureScriptArgs

0 commit comments

Comments
 (0)