<div dir="ltr"><div dir="ltr"><div>Hi Dylan (and others?)</div><div><br></div><div>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:</div><div><br></div><div style="margin-left:40px">swr_knl_args = cpp.first_supported_argument(<br>  '-target-cpu=mic-knl', '-march=knl', '-xMIC-AVX512',<br>  prefix : '''<br>    #if !defined(__AVX512F__) || !defined(__AVX512ER__)<br>    # error<br>    #endif ''',<br>)<br></div></div><div dir="ltr"><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div>- Chuck<br></div>