Dylan Baker <dy...@pnwbakers.com> writes:

> ---
>  meson.build | 129 ++++++++++++++++++++++++++++++++--------------------
>  1 file changed, 79 insertions(+), 50 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 25de31bfabd..4350e1af810 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -775,69 +775,96 @@ endif
>  # TODO: this is very incomplete
>  if ['linux', 'cygwin'].contains(host_machine.system())
>    pre_args += '-D_GNU_SOURCE'
> +elif host_machine.system() == 'windows'
> +  pre_args += [
> +    '-D_WINDOWS', '-D_WIN32_WINNT=0x0601', '-D_WINVER=0x0601',
> +    '-DPIPE_SUBSYSTEM_WINDOWS_USER',
> +    '-D_USE_MATH_DEFINES',  # XXX: scons doesn't use this for mingw
> +  ]
> +  if cc.get_id() == 'msvc'
> +    pre_args += [
> +      '-DVC_EXTRALEAN',
> +      '-D_CRT_SECURE_NO_WARNINGS',
> +      '-D_CRT_SECURE_NO_DEPRECATE',
> +      '-D_SCL_SECURE_NO_WARNINGS',
> +      '-D_SCL_SECURE_NO_DEPRECATE',
> +      '-D_ALLOW_KEYWORD_MACROS',
> +      '-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
> +    ]
> +  else
> +    pre_args += ['-D__MSVCRT_VERSION__=0x0700']
> +  endif
>  endif
>  
>  # Check for generic C arguments
>  c_args = []
> -foreach a : ['-Wall', '-Werror=implicit-function-declaration',
> -             '-Werror=missing-prototypes', '-fno-math-errno',
> -             '-fno-trapping-math', '-Qunused-arguments']
> -  if cc.has_argument(a)
> -    c_args += a
> -  endif
> -endforeach
> -if cc.has_argument('-Wmissing-field-initializers')
> -  c_args += '-Wno-missing-field-initializers'
> -endif
> -
>  c_vis_args = []
> -if cc.has_argument('-fvisibility=hidden')
> -  c_vis_args += '-fvisibility=hidden'
> -endif
> -
> -# Check for generic C++ arguments
> +c_msvc_compat_args = []
> +no_override_init_args = []
>  cpp_args = []
> -foreach a : ['-Wall', '-fno-math-errno', '-fno-trapping-math',
> -             '-Qunused-arguments']
> -  if cpp.has_argument(a)
> -    cpp_args += a
> +cpp_vis_args = []
> +cpp_msvc_compat_args = []
> +if cc.get_id() == 'msvc'
> +  foreach a : ['/wd4018', '/wd4056', '/wd4244', '/wd4246', '/wd4305',
> +               '/wd4351', '/wd4756', '/wd4800', '/wd4996']

The 4246 entry doesn't match scons (4267).  Could we have a list with
comments of what these do, like scons has?

I haven't reviewed the rest of the patch.  It's hard to read without -b.

Attachment: signature.asc
Description: PGP signature

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

Reply via email to