-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Split linker code into a separate file. NFC #20717
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
Conversation
da08cd3
to
cbed15c
Compare
I've been meaning to do this for years, and finally its seems do-able without any major changes. 99.99% of this change is just moving code from one file to another. |
58146d5
to
70f38d2
Compare
@kripken I'd like to land this quickly (i.e. today) if possible to avoid having to update it as other PRs land against the old emcc.py. |
70f38d2
to
a00c819
Compare
DYNAMICLIB_ENDINGS = ['.dylib', '.so'] | ||
STATICLIB_ENDINGS = ['.a'] | ||
|
||
run_via_emxx = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little odd in shared
I think? It only matters for emcc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used by both emcc.py and link.py.. it also need to be settabe from em++.py.
We could change thins into a function that checks sys.argv[0] I guess?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, good to reduce the size of emcc.py
, my one comment can be considered separately.
This change moves more than half of the code in emcc.py which is used only for linking into its own file (link.py). This makes reasoning about the code easier and paves the way for a fast path then only compiling (e.g. this code shouldn't even need to be imported when only compiling). See emscripten-core#20577.
a00c819
to
e027f38
Compare
This change moves more than half of the code in emcc.py which is used only for linking into its own file (link.py). This makes reasoning about the code easier and paves the way for a fast path then only compiling (e.g. this code shouldn't even need to be imported when only compiling). See #20577.