From 2997480ee6eb2e603b092913d50c6de7a5bc813f Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 22 Jul 2021 12:14:59 +0200 Subject: [PATCH] compilers: do accept None in Compiler.compile extra_args The type information allows it, but it is not actually handled. --- mesonbuild/compilers/compilers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 630274df0..157d2a8c9 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -791,7 +791,8 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta): # extra_args must be last because it could contain '/link' to # pass args to VisualStudio's linker. In that case everything # in the command line after '/link' is given to the linker. - commands += extra_args + if extra_args: + commands += extra_args # Generate full command-line with the exelist command_list = self.get_exelist() + commands.to_native() mlog.debug('Running compile:')