diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2020-02-23 20:23:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-23 20:23:03 +0200 |
| commit | 9c604320a0cd47a5b22b52e157d43b73b0533e82 (patch) | |
| tree | 0e90134be40901fcbea20faf36c539b474b80683 /mesonbuild/linkers.py | |
| parent | ee94cb6c15732c8b5f329164af7f2b0a63f4fa6d (diff) | |
| parent | 04e89d0867e358df347dbc8cb91e6df7bc365d9a (diff) | |
| download | meson-9c604320a0cd47a5b22b52e157d43b73b0533e82.zip meson-9c604320a0cd47a5b22b52e157d43b73b0533e82.tar.gz meson-9c604320a0cd47a5b22b52e157d43b73b0533e82.tar.bz2 | |
Merge pull request #6637 from mesonbuild/nirbheek/implement-symbolextractor-windows
Implement symbolextractor on windows + some cleanups/fixes
Diffstat (limited to 'mesonbuild/linkers.py')
| -rw-r--r-- | mesonbuild/linkers.py | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 84eb359..489525b 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -75,6 +75,9 @@ class StaticLinker: def native_args_to_unix(cls, args: T.List[str]) -> T.List[str]: return args[:] + def get_link_debugfile_name(self, targetfile: str) -> str: + return None + def get_link_debugfile_args(self, targetfile: str) -> T.List[str]: # Static libraries do not have PDB files return [] @@ -305,6 +308,10 @@ class DynamicLinker(metaclass=abc.ABCMeta): m = 'Language {} does not support has_multi_link_arguments.' raise mesonlib.EnvironmentException(m.format(self.id)) + def get_debugfile_name(self, targetfile: str) -> str: + '''Name of debug file written out (see below)''' + return None + def get_debugfile_args(self, targetfile: str) -> T.List[str]: """Some compilers (MSVC) write debug into a separate file. @@ -842,10 +849,12 @@ class VisualStudioLikeLinkerMixin: def get_std_shared_lib_args(self) -> T.List[str]: return self._apply_prefix('/DLL') + def get_debugfile_name(self, targetfile: str) -> str: + basename = targetfile.rsplit('.', maxsplit=1)[0] + return basename + '.pdb' + def get_debugfile_args(self, targetfile: str) -> T.List[str]: - pdbarr = targetfile.split('.')[:-1] - pdbarr += ['pdb'] - return self._apply_prefix(['/DEBUG', '/PDB:' + '.'.join(pdbarr)]) + return self._apply_prefix(['/DEBUG', '/PDB:' + self.get_debugfile_name(targetfile)]) def get_link_whole_for(self, args: T.List[str]) -> T.List[str]: # Only since VS2015 |
