[PATCH v4 1/4] build: unblock the use of the MSVC compiler

Bruce Richardson bruce.richardson at intel.com
Mon Aug 14 10:27:03 CEST 2023


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 <roretzla at linux.microsoft.com>
> Acked-by: Bruce Richardson <bruce.richardson at 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?

/Bruce


More information about the dev mailing list