[Mesa-dev] meson: swr: compiler argument detection not working
chuck.atkins at kitware.com
Mon Sep 24 17:34:22 UTC 2018
Hi Dylan (and others?)
SWR has some checks to try to determine which compiler option is needed to
enable a given instruction set. The way this is implemented in Meson seems
to be incorrect currently. For example, the attempt to detect the correct
compiler option to enable the AVX512 KNL instruction support:
swr_knl_args = cpp.first_supported_argument(
'-target-cpu=mic-knl', '-march=knl', '-xMIC-AVX512',
prefix : '''
#if !defined(__AVX512F__) || !defined(__AVX512ER__)
I see a slew of warnings when I enable swr for "prefix" being an
unsupported option to first_supported_argument. Looking in the
implementation, it seems that no keyword arguments are actually considered
at all. This ends up working as-is for gcc since it errors out for
arguments that are not supported. Other compilers (intel icc, for
instance) just display a warning for unsupported arguments and ignore
them. Which ends up with the first option always returning as the valid
one, even though it's not.
So is there a way to pass code to compile to determine which argument is
valid or correct or do I need to create a custom function for this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mesa-dev