diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-09-05 23:45:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 23:45:54 +0300 |
commit | d67d5411bb7fa00226365ebcfc475af08a4ba721 (patch) | |
tree | f0636ff994401375e4e1d38cb7d4559e58462d67 /mesonbuild/environment.py | |
parent | 7b765155347005e01bdd9ae8bfdad7182f27f852 (diff) | |
parent | b9af8f8b6b394903d64e4886712b38a056cd876f (diff) | |
download | meson-d67d5411bb7fa00226365ebcfc475af08a4ba721.zip meson-d67d5411bb7fa00226365ebcfc475af08a4ba721.tar.gz meson-d67d5411bb7fa00226365ebcfc475af08a4ba721.tar.bz2 |
Merge pull request #5823 from scivision/linker-pgi-linux
PGI compiler fixes
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r-- | mesonbuild/environment.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py index cf386da..6d5716b 100644 --- a/mesonbuild/environment.py +++ b/mesonbuild/environment.py @@ -51,6 +51,7 @@ from .linkers import ( MSVCDynamicLinker, OptlinkDynamicLinker, PGIDynamicLinker, + PGIStaticLinker, SolarisDynamicLinker, XildAppleDynamicLinker, XildLinuxDynamicLinker, @@ -1340,6 +1341,8 @@ class Environment: elif isinstance(compiler, IntelClCCompiler): # Intel has it's own linker that acts like microsoft's lib linkers = ['xilib'] + elif isinstance(compiler, (PGICCompiler, PGIFortranCompiler)) and mesonlib.is_windows(): + linkers = [self.default_static_linker] # this is just a wrapper calling link/lib on Windows, keeping things simple. else: linkers = [self.default_static_linker] popen_exceptions = {} @@ -1357,6 +1360,8 @@ class Environment: return IntelVisualStudioLinker(linker, getattr(compiler, 'machine', None)) if '/OUT:' in out.upper() or '/OUT:' in err.upper(): return VisualStudioLinker(linker, getattr(compiler, 'machine', None)) + if 'ar-Error-Unknown switch: --version' in err: + return PGIStaticLinker(linker) if p.returncode == 0 and ('armar' in linker or 'armar.exe' in linker): return ArmarLinker(linker) if 'DMD32 D Compiler' in out or 'DMD64 D Compiler' in out: |