Defer linker input unused and no input files warnings to clang. NFC#20905
Merged
Conversation
'linker' input unused warnings to clang. NFC'linker' input unused and no input files warnings to clang. NFC
'linker' input unused and no input files warnings to clang. NFClinker input unused and no input files warnings to clang. NFC
b260667 to
1e0b354
Compare
dschuff
reviewed
Dec 12, 2023
| input_files.append((i, arg)) | ||
| elif arg.startswith('-L'): | ||
| state.add_link_flag(i, arg) | ||
| newargs[i] = '' |
Member
There was a problem hiding this comment.
trying to understand what this part of the change is for...
previously we were removing the flag from the list and now aren't, so that it gets passed through to clang and clang can warn?
Collaborator
Author
There was a problem hiding this comment.
Yes exactly. If we simply allow all these flags to pass through to clang then clang can take care of issuing the warning instead of us. . which simplifies the code and paves that way for os.execv to be used.
Member
There was a problem hiding this comment.
ok thanks, can you put something to that effect in the commit message?
dschuff
approved these changes
Dec 12, 2023
1e0b354 to
378a0aa
Compare
a89a69b to
64bbd67
Compare
64bbd67 to
3f0eabc
Compare
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Jan 21, 2024
This change partially reverts emscripten-core#20905. Fixes: emscripten-core#21116
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Jan 21, 2024
This change partially reverts emscripten-core#20905. Fixes: emscripten-core#21116
sbc100
added a commit
that referenced
this pull request
Jan 22, 2024
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.
Rather than removing any linker-only flags early on, we now allow those to be
passed onto clang so that:
(a) clang can take care of reporting warning about them so we don't have to
(b) we can exit early, paving the way for the use of
os.execvwhen we run clangSplit out from #20884