OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # The .natvis files define "native visualizers" for the Visual Studio debugger | 5 # The .natvis files define "native visualizers" for the Visual Studio debugger |
6 # that allow one to define how custom types appear. | 6 # that allow one to define how custom types appear. |
7 # | 7 # |
8 # One can use them by adding them to a project in visual studio, and they can | 8 # One can use them by adding them to a project in visual studio, and they can |
9 # be embedded in a project's PDB file using the undocumented linker flag | 9 # be embedded in a project's PDB file using the undocumented linker flag |
10 # /NATVIS. These configs would generally be added to all_dependent_configs | 10 # /NATVIS. These configs would generally be added to all_dependent_configs |
11 # on a target so all targets that link to them will reference the visualizers | 11 # on a target so all targets that link to them will reference the visualizers |
12 # from their PDB files. | 12 # from their PDB files. |
13 # | 13 # |
14 # See https://msdn.microsoft.com/en-us/library/jj620914.aspx for how they work. | 14 # See https://msdn.microsoft.com/en-us/library/jj620914.aspx for how they work. |
15 # | 15 # |
16 # Since these only add ldflags, the targets themselves are not rebuilt when the | 16 # Since these only add ldflags, the targets themselves are not rebuilt when the |
17 # natvis files are updated. To debug, erase the .pdb file and build to re-link. | 17 # natvis files are updated. To debug, erase the .pdb file and build to re-link. |
18 | 18 |
19 import("//build/toolchain/toolchain.gni") | 19 import("//build/config/compiler/compiler.gni") |
20 | 20 |
21 assert(is_win) | 21 assert(is_win) |
22 | 22 |
23 config("chrome") { | 23 config("chrome") { |
24 # TODO(tikuta): remove this condition if lld supports /NATVIS. | 24 # TODO(tikuta): remove this condition if lld supports /NATVIS. |
25 if (!use_lld) { | 25 if (!use_lld) { |
26 ldflags = [ "/NATVIS:" + rebase_path("chrome.natvis", root_build_dir) ] | 26 ldflags = [ "/NATVIS:" + rebase_path("chrome.natvis", root_build_dir) ] |
27 } | 27 } |
28 } | 28 } |
29 | 29 |
30 config("skia") { | 30 config("skia") { |
31 # TODO(tikuta): remove this condition if lld supports /NATVIS. | 31 # TODO(tikuta): remove this condition if lld supports /NATVIS. |
32 if (!use_lld) { | 32 if (!use_lld) { |
33 ldflags = [ "/NATVIS:" + rebase_path("skia.natvis", root_build_dir) ] | 33 ldflags = [ "/NATVIS:" + rebase_path("skia.natvis", root_build_dir) ] |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 config("webkit") { | 37 config("webkit") { |
38 # TODO(tikuta): remove this condition if lld supports /NATVIS. | 38 # TODO(tikuta): remove this condition if lld supports /NATVIS. |
39 if (!use_lld) { | 39 if (!use_lld) { |
40 ldflags = [ "/NATVIS:" + rebase_path("webkit.natvis", root_build_dir) ] | 40 ldflags = [ "/NATVIS:" + rebase_path("webkit.natvis", root_build_dir) ] |
41 } | 41 } |
42 } | 42 } |
OLD | NEW |