Skip to content

Conversation

dschuff
Copy link
Member

@dschuff dschuff commented Dec 16, 2024

  1. This causes -g0 to fullyl override -gsource-map (removing the name section)
    when it comes later on the command line

  2. -gsplit-dwarf and -gsource-map work together resulting in dwarf, source
    maps and name section together.

1) This causes -g0 to fullyl override -gsource-map (removing the name section)
when it comes later on the command line

2) -gsplit-dwarf and -gsource-map work together resulting in dwarf, source
maps and name section together.
@dschuff dschuff requested a review from sbc100 December 16, 2024 20:35
@dschuff dschuff enabled auto-merge (squash) December 16, 2024 20:36
(['-g', '-gsource-map'], True, True, True),
(['-g2', '-gsource-map'], False, True, True),
# (['-gsplit-dwarf', '-gsource-map'], True, True, True), TODO this currently fails!
(['-gsplit-dwarf', '-gsource-map'], True, True, True),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great to see these TODOs fixed!

sections = ['producers'] if not settings.EMIT_PRODUCERS_SECTION else []
building.strip(infile, outfile, debug=not settings.GENERATE_DWARF,
sections=sections)
sections=strip_sections)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This code gives me a headache! LGTM though

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the possible combinations of debug options is pretty bad. But I think this (and the previous change, which added all those tests in test_other) is an improvement because it's now more explicit in the emscripten code rather than part of the behavior being implicit with Binaryen.

@dschuff dschuff merged commit d766ef1 into emscripten-core:main Dec 16, 2024
28 checks passed
@kripken
Copy link
Member

kripken commented Dec 17, 2024

Part 1 is maybe worth a changelog mention?

hedwigz pushed a commit to hedwigz/emscripten that referenced this pull request Dec 18, 2024
1) This causes -g0 to fullyl override -gsource-map (removing the name
section)
when it comes later on the command line

2) -gsplit-dwarf and -gsource-map work together resulting in dwarf,
source
maps and name section together.
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.

3 participants