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 #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
Showing
- Cabal-syntax/src/Distribution/PackageDescription/FieldGrammar.hs 14 additions, 0 deletions...yntax/src/Distribution/PackageDescription/FieldGrammar.hs
- Cabal-syntax/src/Distribution/Types/BuildInfo.hs 7 additions, 0 deletionsCabal-syntax/src/Distribution/Types/BuildInfo.hs
- Cabal-syntax/src/Distribution/Types/BuildInfo/Lens.hs 7 additions, 0 deletionsCabal-syntax/src/Distribution/Types/BuildInfo/Lens.hs
- Cabal-tests/tests/ParserTests/regressions/Octree-0.5.expr 6 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/Octree-0.5.expr
- Cabal-tests/tests/ParserTests/regressions/anynone.expr 2 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/anynone.expr
- Cabal-tests/tests/ParserTests/regressions/big-version.expr 2 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/big-version.expr
- Cabal-tests/tests/ParserTests/regressions/common-conditional.expr 16 additions, 0 deletions...sts/tests/ParserTests/regressions/common-conditional.expr
- Cabal-tests/tests/ParserTests/regressions/common.expr 4 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/common.expr
- Cabal-tests/tests/ParserTests/regressions/common2.expr 16 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/common2.expr
- Cabal-tests/tests/ParserTests/regressions/common3.expr 4 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/common3.expr
- Cabal-tests/tests/ParserTests/regressions/elif.expr 4 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/elif.expr
- Cabal-tests/tests/ParserTests/regressions/elif2.expr 10 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/elif2.expr
- Cabal-tests/tests/ParserTests/regressions/encoding-0.8.expr 2 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/encoding-0.8.expr
- Cabal-tests/tests/ParserTests/regressions/generics-sop.expr 14 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/generics-sop.expr
- Cabal-tests/tests/ParserTests/regressions/hasktorch.expr 36 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/hasktorch.expr
- Cabal-tests/tests/ParserTests/regressions/hidden-main-lib.expr 2 additions, 0 deletions...-tests/tests/ParserTests/regressions/hidden-main-lib.expr
- Cabal-tests/tests/ParserTests/regressions/indentation.expr 2 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/indentation.expr
- Cabal-tests/tests/ParserTests/regressions/indentation2.expr 2 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/indentation2.expr
- Cabal-tests/tests/ParserTests/regressions/indentation3.expr 2 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/indentation3.expr
- Cabal-tests/tests/ParserTests/regressions/issue-5055.expr 6 additions, 0 deletionsCabal-tests/tests/ParserTests/regressions/issue-5055.expr
Loading
Please register or sign in to comment