You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just to point out that debug-info doesn't imply --disable-library-stripping still, which makes debug-info on its own rather useless. If someone points me to the right file then I will prepare a patch.
@mpickering Good place to start is running rg stripLib and rg stripExe. We should also add a warning to cabal-install that fires when the user explicitly enables both one of library/executable-stripping: True and debug-info: True in the config file.
I think that normally one will want to either enable debug-info on per-project basis, or enable it system-wide just for libraries and use the default (strip exes) for exes cabal installed system-wide. So perhaps we need a separate library-debug-info option?
@23Skidoo It seems the natural place to implement this is Cabal.Distribution.Simple.Configure.configure but by that point we have lost the knowledge about how the option came to be set. Where is the right place to implement warnings about things found in cabal.project files?
defaultConfigFlags also seems to set the default to Flag True rather than NoFlag.
Unless there is a similar warning I can look at to see where to implement this check it seems like a lot of untangling to implement the logic where a warning happens if the user has explicitly set the option.
Is this patch actually a good idea? It was only on v2-install that the executables were stripped. Now with this patch there's no way to strip executables when they are installed. Executables built with v2-build didn't get stripped.
Activity
cartazio commentedon Jul 4, 2015
i think you can add that to your ~/.cabal/config file as a default ghc options flag
23Skidoo commentedon Jul 4, 2015
This seems to be already implemented (fbf8499). Try
cabal install --disable-library-stripping --enable-debug-info./cc @tibbe
bitonic commentedon Jul 5, 2015
OK, I'd still like the second part to happen:
It's extremely nice to get
perfoutput side-by-side to the Haskell source.bitonic commentedon Jul 6, 2015
Also, I'd say that
--enable-debug-infoshould automatically disable library stripping, if that's not the case already.23Skidoo commentedon Jul 6, 2015
Yes, makes sense.
mpickering commentedon Jun 24, 2019
Just to point out that
debug-infodoesn't imply--disable-library-strippingstill, which makesdebug-infoon its own rather useless. If someone points me to the right file then I will prepare a patch.lukel97 commentedon Jun 24, 2019
@mpickering see also this TODO left here https://www.haskell.org/cabal/users-guide/nix-local-build.html#cfg-field-executable-stripping
23Skidoo commentedon Jun 25, 2019
@mpickering Good place to start is running
rg stripLibandrg stripExe. We should also add a warning tocabal-installthat fires when the user explicitly enables both one oflibrary/executable-stripping: Trueanddebug-info: Truein the config file.I think that normally one will want to either enable
debug-infoon per-project basis, or enable it system-wide just for libraries and use the default (strip exes) for exescabal installed system-wide. So perhaps we need a separatelibrary-debug-infooption?mpickering commentedon Jun 25, 2019
@23Skidoo It seems the natural place to implement this is
Cabal.Distribution.Simple.Configure.configurebut by that point we have lost the knowledge about how the option came to be set. Where is the right place to implement warnings about things found incabal.projectfiles?mpickering commentedon Jun 25, 2019
defaultConfigFlagsalso seems to set the default toFlag Truerather thanNoFlag.Unless there is a similar warning I can look at to see where to implement this check it seems like a lot of untangling to implement the logic where a warning happens if the user has explicitly set the option.
Make `debug-info` >= 1 imply library/executable-stripping: False
Make `debug-info` >= 1 imply library/executable-stripping: False
mpickering commentedon Jul 1, 2019
Is this patch actually a good idea? It was only on
v2-installthat the executables were stripped. Now with this patch there's no way to strip executables when they are installed. Executables built withv2-builddidn't get stripped.23Skidoo commentedon Jul 1, 2019
You mean, if you have
debug-info: Truein.cabal/config?mpickering commentedon Jul 2, 2019
Yes if you set
debug-info: 3in a global setting.23Skidoo commentedon Jul 2, 2019
Shouldn't this mean that installed exes should have debug info? Perhaps we can add a better warning (at
.cabal/configload time).Make `debug-info` >= 1 imply library/executable-stripping: False