Index: tools/win/DebugVisualizers/BUILD.gn |
diff --git a/tools/win/DebugVisualizers/BUILD.gn b/tools/win/DebugVisualizers/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6ce6395ceeaefc07adf8e4bb9e6fbac70b31f825 |
--- /dev/null |
+++ b/tools/win/DebugVisualizers/BUILD.gn |
@@ -0,0 +1,31 @@ |
+# Copyright 2017 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+# The .natvis files define "native visualizers" for the Visual Studio debugger |
+# that allow one to define how custom types appear. |
+# |
+# One can use them by adding them to a project in visual studio, and they can |
+# be embedded in a project's PDB file using the undocumented linker flag |
+# /NATVIS. These configs would generally be added to all_dependent_configs |
+# on a target so all targets that link to them will reference the visualizers |
+# from their PDB files. |
+# |
+# See https://msdn.microsoft.com/en-us/library/jj620914.aspx for how they work. |
+# |
+# Since these only add ldflags, the targets themselves are not rebuilt when the |
+# natvis files are updated. To debug, erase the .pdb file and build to re-link. |
+ |
+assert(is_win) |
+ |
+config("chrome") { |
+ ldflags = [ "/NATVIS:" + rebase_path("chrome.natvis", root_build_dir) ] |
+} |
+ |
+config("skia") { |
+ ldflags = [ "/NATVIS:" + rebase_path("skia.natvis", root_build_dir) ] |
+} |
+ |
+config("webkit") { |
+ ldflags = [ "/NATVIS:" + rebase_path("webkit.natvis", root_build_dir) ] |
+} |