compilers: improve /Fe vs /Fo args for MSVC - #16107
Open
lucascolley wants to merge 1 commit into
Open
Conversation
bonzini
reviewed
Aug 13, 2026
| cargs = list(self.environment.coredata.get_external_args(self.for_machine, self.language)) | ||
| largs = list(self.environment.coredata.get_external_link_args(self.for_machine, self.language)) | ||
| return self.exelist_no_ccache + self.get_always_args() + self.get_output_args(binname) + [sourcename] + cargs, largs | ||
| return self.exelist_no_ccache + self.get_always_args() + self.get_image_output_args(binname) + [sourcename] + cargs, largs |
Contributor
There was a problem hiding this comment.
I think this is subtly wrong, because the subclass CLikeCompiler._sanity_check_compile_args can choose to make the sanity check compilation only. I'm trying to understand what's the right API for this.
bonzini
requested changes
Aug 13, 2026
this avoids erroneously generating e.g. ``` clang-cl.exe ... /Fosanity_check_for_cython.dll sanity_check_for_cython.c ... /link ... /DLL ``` as happens in Meson 1.12.0 --- Issue diagnosed and patch generated by Claude Opus 5, patch reviewed and edited by me. [skip ci]
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 avoids erroneously generating e.g.
as happens in Meson 1.12.0 — see scipy/scipy#25904 for an issue that might have been avoided without this bug.
Ref. https://learn.microsoft.com/en-us/cpp/build/reference/fo-object-file-name?view=msvc-170 vs. https://learn.microsoft.com/en-us/cpp/build/reference/fe-name-exe-file?view=msvc-170.
Issue diagnosed and patch generated by Claude Opus 5; patch reviewed and edited by me.