-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Defer linker input unused
and no input files
warnings to clang. NFC
#20905
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
'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
@@ -764,33 +759,24 @@ def phase_setup(options, state, newargs): | |||
input_files.append((i, arg)) | |||
elif arg.startswith('-L'): | |||
state.add_link_flag(i, arg) | |||
newargs[i] = '' |
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.
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?
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.
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.
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.
ok thanks, can you put something to that effect in the commit message?
1e0b354
to
378a0aa
Compare
a89a69b
to
64bbd67
Compare
64bbd67
to
3f0eabc
Compare
This change partially reverts emscripten-core#20905. Fixes: emscripten-core#21116
This change partially reverts emscripten-core#20905. Fixes: emscripten-core#21116
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.execv
when we run clangSplit out from #20884