aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2018-09-30 22:30:55 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-20 23:53:29 +0300
commitef14681fa02fd371891e0d9013f5b631aa619400 (patch)
tree460feede4d28bdd3f2dd0542e22e25d7d6a005cb
parent31e6b7043499ab80b839265dc50a6b2506156b06 (diff)
downloadmeson-ef14681fa02fd371891e0d9013f5b631aa619400.zip
meson-ef14681fa02fd371891e0d9013f5b631aa619400.tar.gz
meson-ef14681fa02fd371891e0d9013f5b631aa619400.tar.bz2
Skip creating a PDB file if a debug build hasn't been requested
When running MSVC on linux via wine, the PDB output doesn't work; this allows skipping that part.
-rw-r--r--mesonbuild/backend/ninjabackend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index d8370c2..563b959 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2386,7 +2386,8 @@ rule FORTRAN_DEP_HACK%s
# Add buildtype linker args: optimization level, etc.
commands += linker.get_buildtype_linker_args(self.get_option_for_target('buildtype', target))
# Add /DEBUG and the pdb filename when using MSVC
- commands += self.get_link_debugfile_args(linker, target, outname)
+ if self.get_option_for_target('debug', target):
+ commands += self.get_link_debugfile_args(linker, target, outname)
# Add link args specific to this BuildTarget type, such as soname args,
# PIC, import library generation, etc.
commands += self.get_target_type_link_args(target, linker)