diff options
-rw-r--r-- | mesonbuild/interpreter/type_checking.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/simd.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 296baca..e7edc19 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -470,7 +470,7 @@ SOURCES_VARARGS = (str, File, CustomTarget, CustomTargetIndex, GeneratedList, St BT_SOURCES_KW: KwargInfo[SourcesVarargsType] = KwargInfo( 'sources', - ContainerTypeInfo(list, SOURCES_VARARGS), + (NoneType, ContainerTypeInfo(list, SOURCES_VARARGS)), listify=True, default=[], ) diff --git a/mesonbuild/modules/simd.py b/mesonbuild/modules/simd.py index bce89dd..b8baf39 100644 --- a/mesonbuild/modules/simd.py +++ b/mesonbuild/modules/simd.py @@ -71,7 +71,7 @@ class SimdModule(ExtensionModule): @typed_pos_args('simd.check', str) @typed_kwargs('simd.check', KwargInfo('compiler', Compiler, required=True), - *[BT_SOURCES_KW.evolve(name=iset) for iset in ISETS], + *[BT_SOURCES_KW.evolve(name=iset, default=None) for iset in ISETS], *[a for a in STATIC_LIB_KWS if a.name != 'sources'], allow_unknown=True) # Because we also accept STATIC_LIB_KWS, but build targets have not been completely ported to typed_pos_args/typed_kwargs. @permittedKwargs({'compiler', *ISETS, *build.known_stlib_kwargs}) # Also remove this, per above comment @@ -90,6 +90,8 @@ class SimdModule(ExtensionModule): for iset in ISETS: sources = kwargs[iset] + if sources is None: + continue compile_args = compiler.get_instruction_set_args(iset) if compile_args is None: |