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 building profiled dynamic way #9900

Merged
merged 1 commit into from
Jun 25, 2024

Commits on Jun 25, 2024

  1. Add support for profiled dynamic way

    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
      haskell#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 haskell#4816, haskell#10049, haskell#10050
    mpickering authored and Mikolaj committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    497a220 View commit details
    Browse the repository at this point in the history