aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/environment.py4
-rw-r--r--mesonbuild/linkers.py12
2 files changed, 14 insertions, 2 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index bf49de9..00573f7 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -19,7 +19,7 @@ import typing as T
import collections
from . import coredata
-from .linkers import ArLinker, ArmarLinker, VisualStudioLinker, DLinker, CcrxLinker, Xc16Linker, C2000Linker, IntelVisualStudioLinker
+from .linkers import ArLinker, ArmarLinker, VisualStudioLinker, DLinker, CcrxLinker, Xc16Linker, C2000Linker, IntelVisualStudioLinker, AIXArLinker
from . import mesonlib
from .mesonlib import (
MesonException, EnvironmentException, MachineChoice, Popen_safe,
@@ -1940,7 +1940,7 @@ class Environment:
if p.returncode == 1 and err.startswith('usage'): # OSX
return ArLinker(linker)
if p.returncode == 1 and err.startswith('Usage'): # AIX
- return ArLinker(linker)
+ return AIXArLinker(linker)
if p.returncode == 1 and err.startswith('ar: bad option: --'): # Solaris
return ArLinker(linker)
self._handle_exceptions(popen_exceptions, linkers, 'linker')
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py
index 84c6538..535174d 100644
--- a/mesonbuild/linkers.py
+++ b/mesonbuild/linkers.py
@@ -247,6 +247,18 @@ class C2000Linker(StaticLinker):
return ['-r']
+class AIXArLinker(ArLinker):
+
+ def __init__(self, exelist: T.List[str]):
+ StaticLinker.__init__(self, exelist)
+ self.id = 'aixar'
+ self.std_args = ['-csr', '-Xany']
+
+ def can_linker_accept_rsp(self) -> bool:
+ # AIXAr can't accept arguments using the @rsp syntax
+ return False
+
+
def prepare_rpaths(raw_rpaths: str, build_dir: str, from_dir: str) -> T.List[str]:
# The rpaths we write must be relative if they point to the build dir,
# because otherwise they have different length depending on the build