Skip to content

Commit fd82379

Browse files
committed
SetupWrapper: configure progs when building Setup
This commit configures the unconfigured programs in the program database when we are building a custom Setup script. This ensures that we can find the "strip" program which might otherwise still be unconfigured.
1 parent f0f9ab6 commit fd82379

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,11 +1026,19 @@ getExternalSetupMethod verbosity options pkg bt = do
10261026
createDirectoryIfMissingVerbose verbosity True setupCacheDir
10271027
installExecutableFile verbosity src cachedSetupProgFile
10281028
-- Do not strip if we're using GHCJS, since the result may be a script
1029-
when (maybe True ((/= GHCJS) . compilerFlavor) $ useCompiler options') $
1029+
when (maybe True ((/= GHCJS) . compilerFlavor) $ useCompiler options') $ do
1030+
-- Add the relevant PATH overrides for the package to the
1031+
-- program database.
1032+
setupProgDb
1033+
<- prependProgramSearchPath verbosity
1034+
(useExtraPathEnv options)
1035+
(useExtraEnvOverrides options)
1036+
(useProgramDb options')
1037+
>>= configureAllKnownPrograms verbosity
10301038
Strip.stripExe
10311039
verbosity
10321040
platform
1033-
(useProgramDb options')
1041+
setupProgDb
10341042
cachedSetupProgFile
10351043
return cachedSetupProgFile
10361044
where

0 commit comments

Comments
 (0)