Skip to content

Make debug-info >= 1 imply library/executable-stripping: False - #6111

Merged
23Skidoo merged 1 commit into
haskell:masterfrom
mpickering:debug-info
Jun 27, 2019
Merged

23Skidoo merged 1 commit into
haskell:masterfrom
mpickering:debug-info

Conversation

@mpickering

@mpickering mpickering commented Jun 26, 2019 •

Copy link
Copy Markdown
Collaborator

Fixes #2702

If you enable debug-info then you also have to stop the libraries and
executables being stripped as otherwise the debug symbols are removed.


Please include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Any changes that could be relevant to users have been recorded in the changelog.
  • The documentation has been updated, if necessary.
  • If the change is docs-only, [ci skip] is used to avoid triggering the build bots.

Please also shortly describe how you tested your change. Bonus points for added tests!

Fixes haskell#2702

If you enable `debug-info` then you also have to stop the libraries and
executables being stripped as otherwise the debug symbols are removed.

@23Skidoo 23Skidoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

NoDebugInfo -> return defaultStrip
_ -> case f cfg of
Flag True -> do
warn verbosity $ "Setting debug-info implies "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this cause spurious warnings when using cabal-install? Stripping is enabled by default.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you notice in the PR I change the default value to NoFlag. So if Flag True, it means the user explicitly set it.

I test it out by modifying the cabal.project file for each of the configurations and it behaved as expected.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, just asked to be sure.

@23Skidoo
23Skidoo merged commit ed3ae13 into haskell:master Jun 27, 2019
@23Skidoo

Copy link
Copy Markdown
Member

Merged, thanks!

@23Skidoo

23Skidoo commented Jul 2, 2019

Copy link
Copy Markdown
Member

Cherry-picked to the 3.0 branch.

23Skidoo added a commit that referenced this pull request Jul 2, 2019
Make `debug-info` >= 1 imply library/executable-stripping: False

(cherry picked from commit ed3ae13)
DanielG pushed a commit to DanielG/cabal that referenced this pull request Aug 17, 2019
Make `debug-info` >= 1 imply library/executable-stripping: False

(cherry picked from commit ed3ae13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for -g option

2 participants