summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2014-08-19 00:32:02 +0000
committerscottmg@chromium.org <scottmg@chromium.org@78cadc50-ecff-11dd-a971-7dbc132099af>2014-08-19 00:32:02 +0000
commitb38e5f2f93fa5b31a6001bd21b9d8dcbf73e44e7 (patch)
tree814b4d9ebb24bc7e915968f2021b5899c84ba14b
parentce177a087448f95dffe7a66bf7d789ff1bfc858b (diff)
downloadgyp-b38e5f2f93fa5b31a6001bd21b9d8dcbf73e44e7.tar.gz
ninja win: don't expect pdb to be generated when GenerateDebugInformation: false
if comparison was incorrect for truthy values when added at https://codereview.chromium.org/126443004/ (such as 'false'). Test addition fails before this CL. R=thakis@chromium.org, sky@chromium.org BUG=chromium:404872 Review URL: https://codereview.chromium.org/483133002 git-svn-id: http://gyp.googlecode.com/svn/trunk@1967 78cadc50-ecff-11dd-a971-7dbc132099af
-rw-r--r--pylib/gyp/msvs_emulation.py2
-rw-r--r--test/win/gyptest-link-pdb-no-output.py25
-rw-r--r--test/win/gyptest-link-pdb-output.py1
-rw-r--r--test/win/linker-flags/pdb-output.gyp13
4 files changed, 39 insertions, 2 deletions
diff --git a/pylib/gyp/msvs_emulation.py b/pylib/gyp/msvs_emulation.py
index 5f71e9e1..5384df1c 100644
--- a/pylib/gyp/msvs_emulation.py
+++ b/pylib/gyp/msvs_emulation.py
@@ -370,7 +370,7 @@ class MsvsSettings(object):
output_file = self._Setting(('VCLinkerTool', 'ProgramDatabaseFile'), config)
generate_debug_info = self._Setting(
('VCLinkerTool', 'GenerateDebugInformation'), config)
- if generate_debug_info:
+ if generate_debug_info == 'true':
if output_file:
return expand_special(self.ConvertVSMacros(output_file, config=config))
else:
diff --git a/test/win/gyptest-link-pdb-no-output.py b/test/win/gyptest-link-pdb-no-output.py
new file mode 100644
index 00000000..6da0aeae
--- /dev/null
+++ b/test/win/gyptest-link-pdb-no-output.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2014 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Ensure that when debug information is not output, a pdb is not expected.
+"""
+
+import TestGyp
+
+import os
+import sys
+
+if sys.platform == 'win32':
+ test = TestGyp.TestGyp()
+ CHDIR = 'linker-flags'
+ test.run_gyp('pdb-output.gyp', chdir=CHDIR)
+ test.build('pdb-output.gyp', 'test_pdb_output_disabled', chdir=CHDIR)
+ # Make sure that the build doesn't expect a PDB to be generated when there
+ # will be none.
+ test.up_to_date('pdb-output.gyp', 'test_pdb_output_disabled', chdir=CHDIR)
+
+ test.pass_test()
diff --git a/test/win/gyptest-link-pdb-output.py b/test/win/gyptest-link-pdb-output.py
index 8080410b..27245f7e 100644
--- a/test/win/gyptest-link-pdb-output.py
+++ b/test/win/gyptest-link-pdb-output.py
@@ -31,4 +31,3 @@ if sys.platform == 'win32':
test.fail_test()
test.pass_test()
-
diff --git a/test/win/linker-flags/pdb-output.gyp b/test/win/linker-flags/pdb-output.gyp
index 21d3cd76..1a03c67c 100644
--- a/test/win/linker-flags/pdb-output.gyp
+++ b/test/win/linker-flags/pdb-output.gyp
@@ -32,5 +32,18 @@
},
},
},
+ {
+ 'target_name': 'test_pdb_output_disabled',
+ 'type': 'executable',
+ 'sources': ['hello.cc'],
+ 'msvs_settings': {
+ 'VCCLCompilerTool': {
+ 'DebugInformationFormat': '0'
+ },
+ 'VCLinkerTool': {
+ 'GenerateDebugInformation': 'false',
+ },
+ },
+ },
]
}