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 #9139

Merged
merged 1 commit into from Jul 18, 2023
Merged

Conversation

bgamari
Copy link
Contributor

@bgamari bgamari commented Jul 18, 2023

This is a rebase and fixup of #8557.

  • 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.

* 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.
Copy link
Collaborator

@ulysses4ever ulysses4ever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@Kleidukos Kleidukos added merge me Tell Mergify Bot to merge merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Jul 18, 2023
@Kleidukos
Copy link
Member

Thank you, let's fast-track this

@mergify mergify bot merged commit baa767a into haskell:master Jul 18, 2023
46 checks passed
@Kleidukos
Copy link
Member

@Mergifyio backport 3.10

@mergify
Copy link
Contributor

mergify bot commented Jul 19, 2023

backport 3.10

✅ Backports have been created

andreabedini added a commit to andreabedini/cabal that referenced this pull request Jul 21, 2023
mergify bot pushed a commit that referenced this pull request Aug 10, 2023
* Add alex to build-tool-depends and remove separate code gen

- Pass latin-1 encoding is passed as input pragma
- Cabal hard-codes -g for alex so we don't need to worry about --ghc
- Rework bootstrap, adding per-component building
- Update bootstrap plans

* [bootstrap] warn the user if cabal config is not found

* [bootstrap] regenerate bootstrap plans once more

* [bootstrap] regenerate bootstrap files after #9139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants