Skip to content

Commit

Permalink
Require version 3,11 of Cabal to support --semaphore flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mpickering committed Nov 8, 2023
1 parent 15b5b05 commit 5790a3a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cabal-install/src/Distribution/Client/ProjectPlanning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4284,8 +4284,9 @@ setupHsBuildFlags par_strat elab _ verbosity builddir =
, buildDistPref = toFlag builddir
, buildNumJobs = mempty -- TODO: [nice to have] sometimes want to use toFlag (Just numBuildJobs),
, buildUseSemaphore =
if elabSetupScriptCliVersion elab >= mkVersion [3, 9, 0, 0]
then par_strat
if elabSetupScriptCliVersion elab >= mkVersion [3, 11, 0, 0]
then -- Cabal 3.11 is the first version that supports parallelism semaphores
par_strat
else mempty
, buildArgs = mempty -- unused, passed via args not flags
, buildCabalFilePath = mempty
Expand Down

0 comments on commit 5790a3a

Please sign in to comment.