aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorPaulo Antonio Alvarez <pauloaalvarez@gmail.com>2017-06-02 01:14:18 -0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-06-03 21:32:01 +0300
commit73b0002793a321ea1b0570720ec16fa4a9bc6467 (patch)
treec72016789f9590770f7e31fea874f1a2ba69953a /mesonbuild/compilers.py
parent45cf4191cc21fad707cf97b474c2a00a3fee65b2 (diff)
downloadmeson-73b0002793a321ea1b0570720ec16fa4a9bc6467.zip
meson-73b0002793a321ea1b0570720ec16fa4a9bc6467.tar.gz
meson-73b0002793a321ea1b0570720ec16fa4a9bc6467.tar.bz2
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.
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 69188c5..0340ed2 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):