compilers(MSVC): use /Fe for .dll too - #16107
Conversation
| 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 |
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.
There was a problem hiding this comment.
I think this is subtly wrong, because the subclass
CLikeCompiler._sanity_check_compile_argscan choose to make the sanity check compilation only. I'm trying to understand what's the right API for this.
any further thoughts @bonzini ?
There was a problem hiding this comment.
Nope, sorry. I spent some time when I answered but it's pretty complicated.
There was a problem hiding this comment.
no worries. There has been no response on the LLVM side, so we are still blocked on upgrading to Meson 1.12.0 for now
There was a problem hiding this comment.
To clarify, is this a regression?
There was a problem hiding this comment.
To clarify, is this a regression?
Yeah, from #15092
There was a problem hiding this comment.
The simplest fix here is to also add dll to the check actually. It's perpetuating the hack, but for the sake of fixing a regression it works well. :)
There was a problem hiding this comment.
yeah, I figured that was too hacky, but no problem if that's the way you want to go
There was a problem hiding this comment.
At least for 1.12.1 it is undoubtedly the safest, so go for it.
/Fe vs /Fo args for MSVC/Fe for .dll too
|
Merging as a stopgap fix. Something like |
|
thanks Paolo! BTW I had a chat with David, he is planning to prioritise taking a look at the meson-python stuff for pyo3 🎉 |
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.