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.
@@ -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 []
+ 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.
