Split linker code into a separate file. NFC#20717
Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom Nov 16, 2023
Merged
Split linker code into a separate file. NFC#20717sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100 merged 1 commit intoemscripten-core:mainfrom
Conversation
da08cd3 to
cbed15c
Compare
Collaborator
Author
|
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. |
RReverser
reviewed
Nov 15, 2023
58146d5 to
70f38d2
Compare
Collaborator
Author
|
@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
kripken
reviewed
Nov 16, 2023
| DYNAMICLIB_ENDINGS = ['.dylib', '.so'] | ||
| STATICLIB_ENDINGS = ['.a'] | ||
|
|
||
| run_via_emxx = False |
Member
There was a problem hiding this comment.
This is a little odd in shared I think? It only matters for emcc?
Collaborator
Author
There was a problem hiding this comment.
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?
kripken
approved these changes
Nov 16, 2023
Member
kripken
left a comment
There was a problem hiding this comment.
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.