aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/linkers/linkers.py
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-02-22 22:02:45 -0600
committerDylan Baker <dylan@pnwbakers.com>2023-10-05 08:43:38 -0700
commit4fadb2a2962d0cdb39da7cadd5c7b1b12984eeb5 (patch)
tree00757f76af7d0a92df88e7e241f65e9fc4667f48 /mesonbuild/linkers/linkers.py
parented9d03a0888d376000aa5781704ee3b139fcb8eb (diff)
downloadmeson-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.py3
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)])