default libtype to static to allow windows compilers to not skip

To make Fortran tests useful on Windows, the library_type should default to static,
unless needed to specifically test shared. Shared Fortran libs on Windows for
non-Gfortran compilers is fragile requiring proprietary code syntax.
pull/5733/head
Michael Hirsch, Ph.D 6 years ago
parent 7eebb6749a
commit d0e78a2534
No known key found for this signature in database
GPG Key ID: 6D23CDADAB0294F9
  1. 8
      mesonbuild/compilers/mixins/pgi.py

@ -66,9 +66,11 @@ class PGICompiler():
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']
if self.compiler_type.is_windows_compiler:
return ['-Bdynamic', '-Mmakedll']
elif not self.compiler_type.is_osx_compiler:
return ['-shared']
return []
def get_pic_args(self) -> typing.List[str]:
# PGI -fPIC is Linux only.

Loading…
Cancel
Save