On Mon, Aug 14, 2023 at 12:07:34PM +0300, Dmitry Kozlyuk wrote:
> 2023-08-14 09:27 (UTC+0100), Bruce Richardson:
> > On Fri, Aug 11, 2023 at 11:24:44AM -0700, Tyler Retzlaff wrote:
> > > Detect when MSVC toolset is available and tweak toolchain arguments
> > > where the meson build system offers no abstraction.
> > > 
> > > Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
> > > Acked-by: Bruce Richardson <bruce.richard...@intel.com>
> > > ---
> > >  config/meson.build     | 23 +++++++++++++++--------
> > >  config/x86/meson.build | 10 ++++++----
> > >  lib/meson.build        | 13 ++++++++++---
> > >  3 files changed, 31 insertions(+), 15 deletions(-)
> > > 
> > > diff --git a/config/meson.build b/config/meson.build
> > > index d822371..b6c7d48 100644
> > > --- a/config/meson.build
> > > +++ b/config/meson.build
> > > @@ -16,7 +16,8 @@ endforeach
> > >  
> > >  # MS linker requires special treatment.
> > >  # TODO: use cc.get_linker_id() with Meson >= 0.54
> > > -is_ms_linker = is_windows and (cc.get_id() == 'clang')
> > > +is_ms_compiler = is_windows and (cc.get_id() == 'msvc')
> > > +is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler) 
> > >  
> > 
> > Question out of interest, what other linker option do we have on windows?
> > When is the second part of this conditional false?
> 
> MinGW: GCC    + GNU ld (the second conditional is false)
> Clang: clang  + link.exe
> MSVC:  cl.exe + link.exe

Thanks. I'd forgottena bout mingw!

Reply via email to