Commit d61326ff authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

'cabal build': Don't pass the '-j' flag to old setup scripts.

parent 4c7b7f83
......@@ -302,14 +302,20 @@ buildAction (buildFlags, buildExFlags) extraArgs globalFlags = do
build :: Verbosity -> FilePath -> BuildFlags -> [String] -> IO ()
build verbosity distPref buildFlags extraArgs =
setupWrapper verbosity setupOptions Nothing
(Cabal.buildCommand progConf) (const buildFlags') extraArgs
(Cabal.buildCommand progConf) mkBuildFlags extraArgs
where
progConf = defaultProgramConfiguration
setupOptions = defaultSetupScriptOptions { useDistPref = distPref }
buildFlags' = buildFlags
buildFlags' = buildFlags
{ buildVerbosity = toFlag verbosity
, buildDistPref = toFlag distPref
, buildDistPref = toFlag distPref
}
mkBuildFlags version
| version >= Version [1,19,1] [] = buildFlags'
-- Cabal < 1.19.1 doesn't support 'build -j'.
| otherwise = buildFlags' {
buildNumJobs = NoFlag
}
replAction :: ReplFlags -> [String] -> GlobalFlags -> IO ()
replAction replFlags extraArgs globalFlags = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment