diff options
author | Michael Hirsch, Ph.D <scivision@users.noreply.github.com> | 2019-07-22 13:22:40 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-08-14 13:13:23 -0700 |
commit | 7c5b25ce51f2414f90fba887c1cb09544b4bfca5 (patch) | |
tree | 90d0d33ca79e28f26ae0b3bab4079a646fa13500 | |
parent | cd134b78c08816e92412c5a7f5907d8f40195dbb (diff) | |
download | meson-7c5b25ce51f2414f90fba887c1cb09544b4bfca5.zip meson-7c5b25ce51f2414f90fba887c1cb09544b4bfca5.tar.gz meson-7c5b25ce51f2414f90fba887c1cb09544b4bfca5.tar.bz2 |
linkers: Add PGIDynamicLinker
-rw-r--r-- | mesonbuild/linkers.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 52c65c6..022b9a3 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -707,3 +707,31 @@ class ArmClangDynamicLinker(ArmDynamicLinker): def import_library_args(self, implibname: str) -> typing.List[str]: return ['--symdefs=' + implibname] + + +class PGIDynamicLinker(PosixDynamicLinkerMixin, DynamicLinker): + + """PGI linker.""" + + def get_allow_undefined_args(self) -> typing.List[str]: + return [] + + def get_soname_args(self, env: 'Environment', prefix: str, shlib_name: str, + suffix: str, soversion: str, darwin_versions: typing.Tuple[str, str], + is_shared_module: bool) -> typing.List[str]: + return [] + + def get_std_shared_lib_args(self) -> typing.List[str]: + # PGI -shared is Linux only. + if mesonlib.is_windows(): + return ['-Bdynamic', '-Mmakedll'] + elif mesonlib.is_linux: + return ['-shared'] + return [] + + def build_rpath_args(self, env: 'Environment', build_dir: str, from_dir: str, + rpath_paths: str, build_rpath: str, + install_rpath: str) -> typing.List[str]: + if env.machines[self.for_machine].is_windows(): + return ['-R' + os.path.join(build_dir, p) for p in rpath_paths] + return [] |