aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/mixins
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/compilers/mixins')
-rw-r--r--mesonbuild/compilers/mixins/pgi.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/mesonbuild/compilers/mixins/pgi.py b/mesonbuild/compilers/mixins/pgi.py
index ad94271..3b0451a 100644
--- a/mesonbuild/compilers/mixins/pgi.py
+++ b/mesonbuild/compilers/mixins/pgi.py
@@ -61,9 +61,16 @@ class PGICompiler():
def get_no_warn_args(self) -> typing.List[str]:
return ['-silent']
+ def get_std_shared_lib_link_args(self) -> typing.List[str]:
+ # PGI -shared is Linux only.
+ if self.compiler_type.is_osx_compiler or self.compiler_type.is_windows_compiler:
+ return []
+ return ['-shared']
+
def get_pic_args(self) -> typing.List[str]:
+ # PGI -fPIC is Linux only.
if self.compiler_type.is_osx_compiler or self.compiler_type.is_windows_compiler:
- return [] # PGI -fPIC is Linux only.
+ return []
return ['-fPIC']
def openmp_flags(self) -> typing.List[str]: