Skip to content
Snippets Groups Projects
Matthew Pickering's avatar
Matthew Pickering authored
New options for cabal.project and ./Setup interface:

* `profiling-shared`: Enable building profiling dynamic way
* Passing `--enable-profiling` and `--enable-executable-dynamic` builds
  profiled dynamic executables.

Support for using `profiling-shared` is guarded behind a constraint
which ensures you are using `Cabal >= 3.13`.

In the cabal file:

* `ghc-prof-shared-options`, for passing options when building in
  profiling dynamic way

Other miscellenious fixes and improvements

* Some refactoring around ways so that which
  ways we should build for a library, foreign library and executable is
  computed by the `buildWays` function (rather than ad-hoc in three
  different places).

* Improved logic for detecting whether a compiler supports compiling
  a specific way. See functions `profilingVanillaSupported`,
  `dynamicSupported`, `profilingDynamicSupported` etc
  These functions report accurate infomation after ghc-9.10.1.

* Fixed logic for determining whether to build shared libraries. (see
  #10050)
  Now, if you explicitly enable `--*-shared`, then that will always take
  effect. If it's not specified then `--enable-executable-dynamic` will
  turn on shared libraries IF `--enable-profiling` is not enabled.

* Remove assumption that dynamically linked compilers can build dynamic
  libraries (they might be cross compilers.

* Query the build compiler to determine which library way is necessary
  to be built for TH support to work.
  (rather than assume all compilers are dynamically linked)

* An extensive test which checks how options for `./Setup` and
  `cabal-install` are translated into build ways.

Fixes #4816, #10049, #10050
497a220e
History

The Cabal-syntax package

See the Cabal web site for more information.

The Cabal-syntax package defines the syntax of the .cabal file format and provides tools for parsing .cabal files.

More information

Please see the Cabal web site for the user guide and API documentation. There is additional information available on the development wiki.

Bugs

Please report bugs and feature requests to Cabal's bug tracker.

Your help

To help Cabal's development, it is enormously helpful to know from Cabal's users what their most pressing problems are with Cabal and Hackage. You may have a favourite Cabal bug or limitation. Look at Cabal's bug tracker. Ensure that the problem is reported there and adequately described. Comment on the issue to report how much of a problem the bug is for you. Subscribe to the issue's notifications to discuss requirements and keep informed on progress. For feature requests, it is helpful if there is a description of how you would expect to interact with the new feature.

Source code

You can get the master development branch using:

$ git clone https://github.com/haskell/cabal.git

Credits

See the AUTHORS file.

Authors of the original Cabal specification:

  • Isaac Jones
  • Simon Marlow
  • Ross Patterson
  • Simon Peyton Jones
  • Malcolm Wallace