diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2019-04-28 20:30:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-28 20:30:00 +0300 |
commit | 9cd89f55fca0933dd2897ac7470c5827d939e0ac (patch) | |
tree | 611b7471e0421d078d222bd7a413f762565cad8d /mesonbuild/compilers/compilers.py | |
parent | 60969d99d33001317c569a9b37d3b9efae08d387 (diff) | |
parent | 50f23815658bb704f454c83edfe2cc7e4e419628 (diff) | |
download | meson-9cd89f55fca0933dd2897ac7470c5827d939e0ac.zip meson-9cd89f55fca0933dd2897ac7470c5827d939e0ac.tar.gz meson-9cd89f55fca0933dd2897ac7470c5827d939e0ac.tar.bz2 |
Merge pull request #5323 from scivision/pgiflang
Windows compiler fixes: PGI, Intel
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 87a83e5..04cc31a 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1397,18 +1397,20 @@ class CompilerType(enum.Enum): CCRX_WIN = 40 PGI_STANDARD = 50 + PGI_OSX = 51 + PGI_WIN = 52 @property def is_standard_compiler(self): - return self.name in ('GCC_STANDARD', 'CLANG_STANDARD', 'ICC_STANDARD') + return self.name in ('GCC_STANDARD', 'CLANG_STANDARD', 'ICC_STANDARD', 'PGI_STANDARD') @property def is_osx_compiler(self): - return self.name in ('GCC_OSX', 'CLANG_OSX', 'ICC_OSX') + return self.name in ('GCC_OSX', 'CLANG_OSX', 'ICC_OSX', 'PGI_OSX') @property def is_windows_compiler(self): - return self.name in ('GCC_MINGW', 'GCC_CYGWIN', 'CLANG_MINGW', 'ICC_WIN', 'ARM_WIN', 'CCRX_WIN') + return self.name in ('GCC_MINGW', 'GCC_CYGWIN', 'CLANG_MINGW', 'ICC_WIN', 'ARM_WIN', 'CCRX_WIN', 'PGI_WIN') def get_macos_dylib_install_name(prefix, shlib_name, suffix, soversion): @@ -1690,7 +1692,7 @@ class GnuCompiler(GnuLikeCompiler): class PGICompiler: - def __init__(self, compiler_type=None): + def __init__(self, compiler_type): self.id = 'pgi' self.compiler_type = compiler_type @@ -1706,6 +1708,11 @@ class PGICompiler: def get_no_warn_args(self) -> List[str]: return ['-silent'] + def get_pic_args(self) -> List[str]: + if self.compiler_type.is_osx_compiler or self.compiler_type.is_windows_compiler: + return [] # PGI -fPIC is Linux only. + return ['-fPIC'] + def openmp_flags(self) -> List[str]: return ['-mp'] |