summaryrefslogtreecommitdiff
path: root/chromium/tools/win/DebugVisualizers/BUILD.gn
blob: f2d8958ee5708f26c7fbbb64403d797d0933a71c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 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.

import("//build/config/compiler/compiler.gni")

assert(is_win)

config("chrome") {
  ldflags = [ "/NATVIS:" + rebase_path(get_path_info("chrome.natvis", "abspath")) ]
}

config("skia") {
  ldflags = [ "/NATVIS:" + rebase_path(get_path_info("skia.natvis", "abspath")) ]
}

config("webkit") {
  ldflags = [ "/NATVIS:" + rebase_path(get_path_info("webkit.natvis", "abspath")) ]
}