diff options
author | Dudemanguy <random342@airmail.cc> | 2023-02-22 22:02:45 -0600 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2023-10-05 08:43:38 -0700 |
commit | 4fadb2a2962d0cdb39da7cadd5c7b1b12984eeb5 (patch) | |
tree | 00757f76af7d0a92df88e7e241f65e9fc4667f48 /mesonbuild/linkers/linkers.py | |
parent | ed9d03a0888d376000aa5781704ee3b139fcb8eb (diff) | |
download | meson-4fadb2a2962d0cdb39da7cadd5c7b1b12984eeb5.zip meson-4fadb2a2962d0cdb39da7cadd5c7b1b12984eeb5.tar.gz meson-4fadb2a2962d0cdb39da7cadd5c7b1b12984eeb5.tar.bz2 |
msvc: unify debug filename handling
The MSVC code is extremely confusing, and it turns out it actually
constructs debug (pdb) files names/path independently in separate
places. This is really hard to parse. Instead, refactor it so that the
source of the debug filename is within the target itself
(get_debug_filename). Add a couple of generic methods to retrieve the
full path of the debug filename name in the backend and use that when
needed.
Diffstat (limited to 'mesonbuild/linkers/linkers.py')
-rw-r--r-- | mesonbuild/linkers/linkers.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/linkers/linkers.py b/mesonbuild/linkers/linkers.py index 0c2bf73..5911a9f 100644 --- a/mesonbuild/linkers/linkers.py +++ b/mesonbuild/linkers/linkers.py @@ -1272,8 +1272,7 @@ class VisualStudioLikeLinkerMixin(DynamicLinkerBase): return self._apply_prefix('/DLL') def get_debugfile_name(self, targetfile: str) -> str: - basename = targetfile.rsplit('.', maxsplit=1)[0] - return basename + '.pdb' + return targetfile def get_debugfile_args(self, targetfile: str) -> T.List[str]: return self._apply_prefix(['/DEBUG', '/PDB:' + self.get_debugfile_name(targetfile)]) |