diff options
author | Niklas Claesson <niklas.claesson@cosylab.com> | 2017-10-16 11:37:17 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-11-30 22:36:28 +0200 |
commit | e0274441fc49a39784767fea61992125b37c2349 (patch) | |
tree | 0fe66cdb4a21868f5157cd85f56cdabbdb30491c /mesonbuild/backend/vs2010backend.py | |
parent | 6f25e93b524ec827a55c13632c9ff23a20d8d3c2 (diff) | |
download | meson-e0274441fc49a39784767fea61992125b37c2349.zip meson-e0274441fc49a39784767fea61992125b37c2349.tar.gz meson-e0274441fc49a39784767fea61992125b37c2349.tar.bz2 |
VS: Add /DEBUG to linker to generate debug information
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 69ee3e5..ea02580 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -672,9 +672,6 @@ class Vs2010Backend(backends.Backend): ET.SubElement(type_config, 'DebugInformationFormat').text = 'ProgramDatabase' elif '/Z7' in buildtype_args: ET.SubElement(type_config, 'DebugInformationFormat').text = 'OldStyle' - # Generate Debug info - if '/DEBUG' in buildtype_link_args: - ET.SubElement(type_config, 'GenerateDebugInformation').text = 'true' # Runtime checks if '/RTC1' in buildtype_args: ET.SubElement(type_config, 'BasicRuntimeChecks').text = 'EnableFastChecks' @@ -885,6 +882,9 @@ class Vs2010Backend(backends.Backend): # vcxproj file (similar to buildtype compiler args) instead of in # AdditionalOptions? extra_link_args += compiler.get_buildtype_linker_args(self.buildtype) + # Generate Debug info + if self.buildtype.startswith('debug'): + self.generate_debug_information(link) if not isinstance(target, build.StaticLibrary): if isinstance(target, build.SharedModule): extra_link_args += compiler.get_std_shared_module_link_args() @@ -1190,3 +1190,7 @@ if %%errorlevel%% neq 0 goto :VCEnd''' cmd_templ % ('" "'.join(test_command)) ET.SubElement(root, 'Import', Project='$(VCTargetsPath)\Microsoft.Cpp.targets') self._prettyprint_vcxproj_xml(ET.ElementTree(root), ofname) + + def generate_debug_information(self, link): + # valid values for vs2015 is 'false', 'true', 'DebugFastLink' + ET.SubElement(link, 'GenerateDebugInformation').text = 'true' |