Skip to content

Feature request: flag for debugging symbols #5101

Open
@flip111

Description

@flip111

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.
  2. 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 talks about passing configure options to Setup.hs and underlying Cabal code.

However it's closed with the implementation of #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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions