Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for using GHC's -jsem option (backport #9139) #9140

Closed
wants to merge 1 commit into from

Commits on Jul 19, 2023

  1. Add support for using GHC's -jsem option

    * The top-level user interface to enable the use of the semaphore is the
      `--semaphore` flag. If you pass `-j4 --semaphore` then cabal will
      create a semaphore with 4 slots which is passed to ghc using the
      `-jsem` option so that all GHC processes coordinate to use 4
      capabilities.
    
      - The semaphore logic is provided by a new package `semaphore-compat`
        which provides a cross-platform abstraction for semaphores.
    
    * The low level `./Setup.hs build` interface accepts the `--semaphore
      <SEMAPHORE>` option, which can be used to directly pass the semaphore
      you require to the Setup script.
    
    (cherry picked from commit 0a1c167)
    
    # Conflicts:
    #	Cabal/src/Distribution/Simple/Build.hs
    #	Cabal/src/Distribution/Simple/Compiler.hs
    #	Cabal/src/Distribution/Simple/GHC.hs
    #	Cabal/src/Distribution/Simple/GHCJS.hs
    #	Cabal/src/Distribution/Simple/Program/GHC.hs
    #	Cabal/src/Distribution/Simple/Setup.hs
    #	Cabal/src/Distribution/Simple/Setup/Build.hs
    #	bootstrap/linux-9.4.5.json
    #	cabal-install/src/Distribution/Client/Config.hs
    #	cabal-install/src/Distribution/Client/JobControl.hs
    #	cabal-install/src/Distribution/Client/ProjectBuilding.hs
    #	cabal-install/src/Distribution/Client/ProjectConfig.hs
    #	cabal-install/src/Distribution/Client/ProjectConfig/Legacy.hs
    #	cabal-install/src/Distribution/Client/ProjectConfig/Types.hs
    #	cabal-install/src/Distribution/Client/ProjectPlanning.hs
    #	cabal-install/src/Distribution/Client/Setup.hs
    #	cabal-install/tests/UnitTests/Distribution/Client/ProjectConfig.hs
    mpickering authored and mergify[bot] committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    ecf92e8 View commit details
    Browse the repository at this point in the history