diff --git a/Cabal/src/Distribution/Simple/GHC.hs b/Cabal/src/Distribution/Simple/GHC.hs index e71c20d47bc..c96e520bb47 100644 --- a/Cabal/src/Distribution/Simple/GHC.hs +++ b/Cabal/src/Distribution/Simple/GHC.hs @@ -720,12 +720,20 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do comp = compiler lbi platform = hostPlatform lbi mbWorkDir = mbWorkDirLBI lbi - vanillaArgs = + vanillaArgs0 = (Internal.componentGhcOptions verbosity lbi libBi clbi (componentBuildDir lbi clbi)) `mappend` mempty { ghcOptMode = toFlag GhcModeAbiHash , ghcOptInputModules = toNubListR $ exposedModules lib } + vanillaArgs = + -- Package DBs unnecessary, and break ghc-cabal. See #3633 + -- BUT, put at least the global database so that 7.4 doesn't + -- break. + vanillaArgs0 + { ghcOptPackageDBs = [GlobalPackageDB] + , ghcOptPackages = mempty + } sharedArgs = vanillaArgs `mappend` mempty diff --git a/Cabal/src/Distribution/Simple/GHCJS.hs b/Cabal/src/Distribution/Simple/GHCJS.hs index 973230ee3c7..e1aec70a096 100644 --- a/Cabal/src/Distribution/Simple/GHCJS.hs +++ b/Cabal/src/Distribution/Simple/GHCJS.hs @@ -1768,12 +1768,20 @@ libAbiHash verbosity _pkg_descr lbi lib clbi = do comp = compiler lbi platform = hostPlatform lbi mbWorkDir = mbWorkDirLBI lbi - vanillaArgs = + vanillaArgs0 = (componentGhcOptions verbosity lbi libBi clbi (componentBuildDir lbi clbi)) `mappend` mempty { ghcOptMode = toFlag GhcModeAbiHash , ghcOptInputModules = toNubListR $ exposedModules lib } + vanillaArgs = + -- Package DBs unnecessary, and break ghc-cabal. See #3633 + -- BUT, put at least the global database so that 7.4 doesn't + -- break. + vanillaArgs0 + { ghcOptPackageDBs = [GlobalPackageDB] + , ghcOptPackages = mempty + } sharedArgs = vanillaArgs `mappend` mempty