Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify linker flag handling. NFC #23515

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jan 28, 2025

This change simplifies the interface between emcc.py (the compiler driver) and link.py (the linker).

Linker flags are no longer stored in the EmccState or stored alongside their ordinal number. Instead passed directly the link.py as a simple list.

This change brings us closer to de-coupling the linker process with the hope of creating a standalone emld entry point.

@sbc100 sbc100 force-pushed the link_flags_simplify branch 3 times, most recently from d497c69 to 4b3a82f Compare January 28, 2025 18:29
@sbc100 sbc100 force-pushed the link_flags_simplify branch 5 times, most recently from c5b966a to 4d65a11 Compare February 5, 2025 00:37
@sbc100 sbc100 requested review from kripken and dschuff and removed request for kripken February 5, 2025 01:00
@sbc100 sbc100 force-pushed the link_flags_simplify branch from 4d65a11 to 4bb9d35 Compare February 5, 2025 01:09
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

lgtm % style nit

Linker flags no longer stored in the EmccState and no longer stored
along with their original number.

Instead, we generate a list of LinkArg objects.  We then process these
as we compile the inputs, replacing source files with object files as
we compile them.
@sbc100 sbc100 force-pushed the link_flags_simplify branch from 4bb9d35 to 97bde0d Compare February 5, 2025 20:22
@sbc100 sbc100 merged commit 753f1ef into emscripten-core:main Feb 5, 2025
2 of 13 checks passed
@sbc100 sbc100 deleted the link_flags_simplify branch February 5, 2025 20:23
sbc100 added a commit to sbc100/emscripten that referenced this pull request Feb 5, 2025
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.

None yet

2 participants