aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com>2023-10-29 23:02:24 -0500
committerEli Schwartz <eschwartz93@gmail.com>2023-10-31 19:24:09 -0400
commitcfec255027ca7c928defcc665a12e91b439c7c3f (patch)
treea358bc6c670cadc2ef22dfe820a0305c5d02328f
parentf4d19db25e3183833a5e2d77ef5ab40b9b523144 (diff)
downloadmeson-cfec255027ca7c928defcc665a12e91b439c7c3f.zip
meson-cfec255027ca7c928defcc665a12e91b439c7c3f.tar.gz
meson-cfec255027ca7c928defcc665a12e91b439c7c3f.tar.bz2
Fix traceback on AIX in shlib archiving code
A compiler may not have a linker: ``` 'NoneType' object has no attribute 'get_command_to_archive_shlib' ```
-rw-r--r--mesonbuild/compilers/compilers.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index fb399b1..a7bb6c4 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -962,6 +962,8 @@ class Compiler(HoldableObject, metaclass=abc.ABCMeta):
return self.linker.get_archive_name(filename)
def get_command_to_archive_shlib(self) -> T.List[str]:
+ if not self.linker:
+ return []
return self.linker.get_command_to_archive_shlib()
def thread_flags(self, env: 'Environment') -> T.List[str]: