[PATCH] config/x86: enable compatibility with muon-build
Loftus, Ciara
ciara.loftus at intel.com
Wed Apr 22 13:02:46 CEST 2026
> Subject: [PATCH] config/x86: enable compatibility with muon-build
>
> Muon[1] is a reimplementation of meson in C, and in some ways is rather
> stricter than meson in processing the build files. Make a few small
> changes to the meson.build files to improve muon compatibility without
> affecting meson:
> * when checking a list of compiler args always use has_multi_arguments
> rather than has_argument, even if list only contains one item.
> * when putting lists of compiler args in message output, explicitly
> convert to a string for output using ','.join().
>
> [1] https://github.com/muon-build/muon
>
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
I tested this out with both muon built from source and muon downloaded
as a package ("muon-meson"). Only the version from source worked, as the
package version was missing some features required for building DPDK. I
encountered the same issue with the cnxk driver you flagged. Build was
successful after disabling. I think it makes sense to make these
changes.
Acked-by: Ciara Loftus <ciara.loftus at intel.com>
> ---
> Note: after this patch, the majority of DPDK configures ok using muon on
> my x86 system. Some drivers have not been checked due to missing
> dependencies on my system, but one, ml/cnxk, I had to explicitly disable
> as it's using a feature not currently supported by muon (cmake_args
> parameter to "dependency()").
> Despite this limitation, I think occasionally testing things with muon
> is useful to more rigorously check our build files.
> ---
> config/x86/meson.build | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/config/x86/meson.build b/config/x86/meson.build
> index d2f4d5c02a..124b204847 100644
> --- a/config/x86/meson.build
> +++ b/config/x86/meson.build
> @@ -68,7 +68,7 @@ if is_linux or cc.get_id() == 'gcc'
> endif
>
> avx512_march_flag = ['-march=x86-64-v4']
> -if not cc.has_argument(avx512_march_flag)
> +if not cc.has_multi_arguments(avx512_march_flag)
> avx512_march_flag = ['-march=skylake-avx512']
> endif
> # workaround for older compilers, e.g. GCC 8.5 on RHEL 8.
> @@ -99,9 +99,9 @@ if (binutils_ok and
> cc.has_multi_arguments(avx512_march_flag)
> endif
> endif
> if developer_mode and meson.version().version_compare('>=0.60.2')
> - message('Extra C flags needed for AVX2 output:
> @0@'.format(cc_avx2_flags))
> + message('Extra C flags needed for AVX2 output:
> [@0@]'.format(','.join(cc_avx2_flags)))
> if cc_has_avx512
> - message('Extra C flags needed for AVX512 output:
> @0@'.format(cc_avx512_flags))
> + message('Extra C flags needed for AVX512 output:
> [@0@]'.format(','.join(cc_avx512_flags)))
> endif
> endif
>
> --
> 2.51.0
More information about the dev
mailing list