commercialhaskell / commercialhaskell/stack
Feature request: flag for debugging symbols
- Dominant language
- Haskell
- Stars
- 4.1k
- Forks
- 850
- Avg merge
- 10h 37m
- Merged PRs (30d)
- 4
Description
Right not `stack` supports `--no-strip` and `--ghc-options="-g"` with which it's possible to get debugging symbols in the executable. However ...
1. cabal has it's own flag `--enable-debug-info` which i've been told sets `-g` and also `-enable-dwarf-unwind`. So to recreate this behaviour we get to the wieldy: `stack build --no-strip --ghc-options="-g -enable-dward-unwind"`. To just have something like `stack build --with-symbols` would be much nicer.
1. Using `--ghc-options` bypasses cabal code, now `Setup.hs` scripts don't get notified that debug symbols were requested. I'm calling cmake from my `Setup.hs` script and i would like to compile dependencies (C code) also with symbols depending on the configuration for my library.
On a side note ...
[This issue](https://github.com/commercialhaskell/stack/issues/1438) talks about passing configure options to `Setup.hs` and underlying Cabal code.
However it's closed with the implementation of https://github.com/commercialhaskell/stack/pull/4750
But that PR talks about configure options for Pantry. I don't quite get how that is related, but it makes me believe that the added feature can not be used for Cabal because it's for Pantry.
Contributor guide
Assessment
This issue has not been assessed yet.