• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016 the V8 project authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("../../gni/v8.gni")
6
7_inspector_protocol = v8_path_prefix + "/third_party/inspector_protocol"
8import("$_inspector_protocol/inspector_protocol.gni")
9
10_protocol_generated = [
11  "protocol/Forward.h",
12  "protocol/Protocol.cpp",
13  "protocol/Protocol.h",
14  "protocol/Console.cpp",
15  "protocol/Console.h",
16  "protocol/Debugger.cpp",
17  "protocol/Debugger.h",
18  "protocol/HeapProfiler.cpp",
19  "protocol/HeapProfiler.h",
20  "protocol/Profiler.cpp",
21  "protocol/Profiler.h",
22  "protocol/Runtime.cpp",
23  "protocol/Runtime.h",
24  "protocol/Schema.cpp",
25  "protocol/Schema.h",
26  "../../include/inspector/Debugger.h",
27  "../../include/inspector/Runtime.h",
28  "../../include/inspector/Schema.h",
29]
30
31action("protocol_compatibility") {
32  visibility = [ ":*" ]  # Only targets in this file can depend on this.
33  script = "$_inspector_protocol/CheckProtocolCompatibility.py"
34  inputs = [
35    "js_protocol.json",
36  ]
37  _stamp = "$target_gen_dir/js_protocol.stamp"
38  outputs = [
39    _stamp,
40  ]
41  args = [
42    "--stamp",
43    rebase_path(_stamp, root_build_dir),
44    rebase_path("js_protocol.json", root_build_dir),
45  ]
46}
47
48inspector_protocol_generate("protocol_generated_sources") {
49  visibility = [ ":*" ]  # Only targets in this file can depend on this.
50  deps = [
51    ":protocol_compatibility",
52  ]
53
54  inspector_protocol_dir = _inspector_protocol
55  out_dir = target_gen_dir
56  config_file = "inspector_protocol_config.json"
57  inputs = [
58    "js_protocol.json",
59    "inspector_protocol_config.json",
60  ]
61  outputs = _protocol_generated
62}
63
64action("inspector_injected_script") {
65  visibility = [ ":*" ]  # Only targets in this file can depend on this.
66  script = "build/xxd.py"
67  inputs = [
68    "injected-script-source.js",
69  ]
70  outputs = [
71    "$target_gen_dir/injected-script-source.h",
72  ]
73  args = [
74    "InjectedScriptSource_js",
75    rebase_path("injected-script-source.js", root_build_dir),
76    rebase_path("$target_gen_dir/injected-script-source.h", root_build_dir),
77  ]
78}
79
80config("inspector_config") {
81  visibility = [ ":*" ]  # Only targets in this file can depend on this.
82  if (is_component_build) {
83    defines = [ "BUILDING_V8_SHARED" ]
84  }
85}
86
87v8_source_set("inspector") {
88  deps = [
89    ":inspector_injected_script",
90    ":protocol_generated_sources",
91  ]
92  configs = [ ":inspector_config" ]
93  include_dirs = [
94    "../..",
95    "../../include",
96    "$target_gen_dir/../..",
97    "$target_gen_dir/../../include",
98  ]
99  sources = rebase_path(_protocol_generated, ".", target_gen_dir)
100  sources += [
101    "../../include/v8-inspector-protocol.h",
102    "../../include/v8-inspector.h",
103  ]
104  sources += get_target_outputs(":inspector_injected_script")
105  sources += [
106    "injected-script.cc",
107    "injected-script.h",
108    "inspected-context.cc",
109    "inspected-context.h",
110    "remote-object-id.cc",
111    "remote-object-id.h",
112    "search-util.cc",
113    "search-util.h",
114    "string-16.cc",
115    "string-16.h",
116    "string-util.cc",
117    "string-util.h",
118    "test-interface.cc",
119    "test-interface.h",
120    "v8-console-agent-impl.cc",
121    "v8-console-agent-impl.h",
122    "v8-console-message.cc",
123    "v8-console-message.h",
124    "v8-console.cc",
125    "v8-console.h",
126    "v8-debugger-agent-impl.cc",
127    "v8-debugger-agent-impl.h",
128    "v8-debugger-script.cc",
129    "v8-debugger-script.h",
130    "v8-debugger.cc",
131    "v8-debugger.h",
132    "v8-function-call.cc",
133    "v8-function-call.h",
134    "v8-heap-profiler-agent-impl.cc",
135    "v8-heap-profiler-agent-impl.h",
136    "v8-injected-script-host.cc",
137    "v8-injected-script-host.h",
138    "v8-inspector-impl.cc",
139    "v8-inspector-impl.h",
140    "v8-inspector-session-impl.cc",
141    "v8-inspector-session-impl.h",
142    "v8-internal-value-type.cc",
143    "v8-internal-value-type.h",
144    "v8-profiler-agent-impl.cc",
145    "v8-profiler-agent-impl.h",
146    "v8-regex.cc",
147    "v8-regex.h",
148    "v8-runtime-agent-impl.cc",
149    "v8-runtime-agent-impl.h",
150    "v8-schema-agent-impl.cc",
151    "v8-schema-agent-impl.h",
152    "v8-stack-trace-impl.cc",
153    "v8-stack-trace-impl.h",
154    "v8-value-utils.cc",
155    "v8-value-utils.h",
156    "wasm-translation.cc",
157    "wasm-translation.h",
158  ]
159}
160