[PATCH v4 4/4] build: enable MSVC specific compiler options

David Marchand david.marchand at redhat.com
Tue Aug 15 15:21:23 CEST 2023


Hello Tyler,

On Fri, Aug 11, 2023 at 8:24 PM Tyler Retzlaff
<roretzla at linux.microsoft.com> wrote:
>
> * Enable optional use of C11 atomics support.
> * Enable use of C23 typeof operator.
> * Explicitly force intrinsics when building with MSVC.
> * Disable MSVC C runtime checks.
>
> Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
> ---
>  config/meson.build | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/config/meson.build b/config/meson.build
> index 821a1c3..839057a 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -27,6 +27,14 @@ dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1)
>  is_ms_compiler = is_windows and (cc.get_id() == 'msvc')
>  is_ms_linker = is_windows and (cc.get_id() == 'clang' or is_ms_compiler)
>
> +# MS compiler (except x86) does not support inline assembly

One last (hopefully) small question, what does this comment apply to?
Forced use of intrinsics?

> +if is_ms_compiler
> +    dpdk_conf.set('_CRT_SECURE_NO_WARNINGS', 1)
> +    dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
> +    add_project_arguments('/experimental:c11atomics', language: 'c')
> +    add_project_arguments('/d1experimental:typeof', language: 'c')
> +endif
> +
>  # set the major version, which might be used by drivers and libraries
>  # depending on the configuration options
>  pver = meson.project_version().split('.')
> --
> 1.8.3.1
>


-- 
David Marchand



More information about the dev mailing list