aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/compilers/compilers.py2
-rw-r--r--mesonbuild/environment.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 8ff8f9d..ec88794 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -1979,6 +1979,8 @@ class GnuLikeCompiler(abc.ABC):
elif self.compiler_type.is_windows_compiler:
# For PE/COFF this is impossible
return []
+ elif mesonlib.is_sunos():
+ return []
else:
# GNU ld and LLVM lld
return ['-Wl,--allow-shlib-undefined']
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 1df80ca..84a7596 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -1222,6 +1222,8 @@ class Environment:
return ArLinker(linker)
if p.returncode == 1 and err.startswith('Usage'): # AIX
return ArLinker(linker)
+ if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris
+ return ArLinker(linker)
self._handle_exceptions(popen_exceptions, linkers, 'linker')
raise EnvironmentException('Unknown static linker "%s"' % ' '.join(linkers))