diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-08-17 23:26:32 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-08-17 23:28:35 +0300 |
commit | 5e047d9c91038480bbe0d11205aa3dcc4bf7dfd0 (patch) | |
tree | 5a369dec25ba30b23a092145c1190b5d47a99a12 | |
parent | 58359c8fac09ecd06af1d389bfad8cd65e831e2a (diff) | |
download | meson-5e047d9c91038480bbe0d11205aa3dcc4bf7dfd0.zip meson-5e047d9c91038480bbe0d11205aa3dcc4bf7dfd0.tar.gz meson-5e047d9c91038480bbe0d11205aa3dcc4bf7dfd0.tar.bz2 |
Write pdb info to a specific file.
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 1 | ||||
-rw-r--r-- | mesonbuild/compilers.py | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 15f298b..cb007d4 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1521,6 +1521,7 @@ rule FORTRAN_DEP_HACK commands+= compiler.get_include_args(i, False) if self.environment.coredata.base_options.get('b_pch', False): commands += self.get_pch_include_args(compiler, target) + commands += compiler.get_compile_debugfile_args(rel_obj) crstr = '' if target.is_cross: crstr = '_CROSS' diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index d020033..5a8f48a 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -352,6 +352,11 @@ class Compiler(): def get_colorout_args(self, colortype): return [] + # Some compilers (msvc) write debug info to a separate file. + # These args specify where it should be written. + def get_compile_debugfile_args(self, rel_obj): + return [] + class CCompiler(Compiler): def __init__(self, exelist, version, is_cross, exe_wrapper=None): super().__init__(exelist, version) @@ -1599,6 +1604,10 @@ class VisualStudioCCompiler(CCompiler): raise MesonException('Compiling test app failed.') return not(warning_text in stde or warning_text in stdo) + def get_compile_debugfile_args(self, rel_obj): + pdbarr = rel_obj.split('.')[:-1] + ['pdb'] + return ['/Fd' + '.'.join(pdbarr)] + class VisualStudioCPPCompiler(VisualStudioCCompiler): def __init__(self, exelist, version, is_cross, exe_wrap): VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap) |