[PATCH] D144084: [LLD] [COFF] Don't try to detect MSVC installations in mingw mode
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 00:33:11 PST 2023
mstorsjo added a comment.
In D144084#4140157 <https://reviews.llvm.org/D144084#4140157>, @mati865 wrote:
> Should that even be considered as supported?
That's a good question... The flag in itself unlocks a whole bunch of behaviours, some which can be considered useful, and some probably just as tolerable sideeffects (like adding list markers for `__CTOR_LIST__` and such) - so in general I guess it's a bit iffy. I have mentioned the flag to various people throughout the years that they can try it out to see if it gives a behaviour they need though.
For some behaviours, there are individual flags that control the behaviours (like `-stdcall-fixup` or `-auto-import`) where the default behaviour depends on whether the mingw flag is set - but there are also lots of behaviours that aren't individually controllable.
I'm not sure what would be best here - add a more specific `-tolerate-duplicate-weak-sybols` option or something like that? Or add a more specific flag, always passed by default by the mingw driver frontend, e.g. `-detect-msvc:no`?
For context - I haven't heard about a specific case where this would make any difference, I just noticed the fact that this is done unconditionally - and there's a small risk that someone ends up relying on implicitly linking in things from a WinSDK they have lying around.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144084/new/
https://reviews.llvm.org/D144084
More information about the llvm-commits
mailing list