Quoting Jon Turney (2018-06-15 09:51:31)
> On 11/06/2018 23:56, Dylan Baker wrote:
> > We need to add an extra flag (/SUBSYSTEM:CONSOLE) to get the msvc linker
> > to find main() in a static library.
> > ---
> >   src/gtest/meson.build | 7 +++++++
> >   1 file changed, 7 insertions(+)
> > 
> > diff --git a/src/gtest/meson.build b/src/gtest/meson.build
> > index 91a49240416..ed0d6974bd3 100644
> > --- a/src/gtest/meson.build
> > +++ b/src/gtest/meson.build
> > @@ -25,7 +25,14 @@ libgtest = static_library(
> >     build_by_default : false,
> >   )
> >   
> > +_gtest_link_args = []
> > +if cpp.get_id() == 'msvc'
> > +  # required to use main() from a static library
> > +  _gtest_link_args += '/SUBSYSTEM:CONSOLE'
> > +endif
> 
> I think this is perhaps working around a meson bug
> 
> (This linker setting should be implied by executable(gui_app:false), but 
> I don't think that is the case for msvc with ninja backend.  See 
> https://github.com/mesonbuild/meson/pull/1794)
> 
> The rest of the series looks ok to me, but it's not stuff I actually use.

I didn't even think about that it might be a ninja backend bug, I tried using
the gui_false and it didn't change anything. I think I'll go see if it works
correctly with the VS backend, if that's the case then I'll fix that I guess.

Dylan

Attachment: signature.asc
Description: signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to