From 73b0002793a321ea1b0570720ec16fa4a9bc6467 Mon Sep 17 00:00:00 2001 From: Paulo Antonio Alvarez Date: Fri, 2 Jun 2017 01:14:18 -0300 Subject: [PATCH] compilers: Make CCompiler.find_library return value consistent When the CCompiler.links method call in CCompiler.find_library fails, find_library resorts to finding the library file itself. In this second case, the return value is not a list, whereas if links suceeds, the return value is a list. Make it so that find_library returns a list in either case. --- mesonbuild/compilers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 69188c568..0340ed2a0 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -1381,10 +1381,10 @@ class CCompiler(Compiler): for suffix in suffixes: trial = os.path.join(d, 'lib' + libname + '.' + suffix) if os.path.isfile(trial): - return trial + return [trial] trial2 = os.path.join(d, libname + '.' + suffix) if os.path.isfile(trial2): - return trial2 + return [trial2] return None def thread_flags(self):