diff options
author | Aditya Vidyadhar Kamath <Aditya.Kamath1@ibm.com> | 2023-10-29 23:02:24 -0500 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-10-31 19:24:09 -0400 |
commit | cfec255027ca7c928defcc665a12e91b439c7c3f (patch) | |
tree | a358bc6c670cadc2ef22dfe820a0305c5d02328f | |
parent | f4d19db25e3183833a5e2d77ef5ab40b9b523144 (diff) | |
download | meson-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.py | 2 |
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]: |