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/check_protocol_compatibility.py" 34 inputs = [ v8_inspector_js_protocol ] 35 _stamp = "$target_gen_dir/js_protocol.stamp" 36 outputs = [ _stamp ] 37 args = [ 38 "--stamp", 39 rebase_path(_stamp, root_build_dir), 40 rebase_path(v8_inspector_js_protocol, root_build_dir), 41 ] 42} 43 44inspector_protocol_generate("protocol_generated_sources") { 45 visibility = [ ":*" ] # Only targets in this file can depend on this. 46 deps = [ ":protocol_compatibility" ] 47 48 inspector_protocol_dir = _inspector_protocol 49 out_dir = target_gen_dir 50 _protocol_path = rebase_path(v8_inspector_js_protocol, root_build_dir) 51 config_values = [ "protocol.path=$_protocol_path" ] 52 config_file = v8_path_prefix + "/src/inspector/inspector_protocol_config.json" 53 inputs = [ 54 v8_inspector_js_protocol, 55 config_file, 56 ] 57 outputs = _protocol_generated 58} 59 60config("inspector_config") { 61 visibility = [ ":*" ] # Only targets in this file can depend on this. 62 63 configs = [ "../../:internal_config" ] 64 include_dirs = [ "../../include" ] 65} 66 67v8_header_set("inspector_test_headers") { 68 configs = [ ":inspector_config" ] 69 70 public_deps = [ "../..:v8_headers" ] 71 72 sources = [ "test-interface.h" ] 73} 74 75v8_source_set("inspector_string_conversions") { 76 sources = [ 77 "v8-string-conversions.cc", 78 "v8-string-conversions.h", 79 ] 80 configs = [ "../..:internal_config_base" ] 81 deps = [ "../..:v8_libbase" ] 82} 83 84v8_source_set("inspector") { 85 deps = [ 86 ":inspector_string_conversions", 87 "../..:v8_tracing", 88 "../..:v8_version", 89 "../../third_party/inspector_protocol:crdtp", 90 ] 91 92 public_deps = [ 93 ":inspector_test_headers", 94 ":protocol_generated_sources", 95 "../../:v8_libbase", 96 ] 97 98 configs = [ ":inspector_config" ] 99 100 sources = rebase_path(_protocol_generated, ".", target_gen_dir) 101 sources += [ 102 "../../include/v8-inspector-protocol.h", 103 "../../include/v8-inspector.h", 104 ] 105 sources += [ 106 "custom-preview.cc", 107 "custom-preview.h", 108 "injected-script.cc", 109 "injected-script.h", 110 "inspected-context.cc", 111 "inspected-context.h", 112 "remote-object-id.cc", 113 "remote-object-id.h", 114 "search-util.cc", 115 "search-util.h", 116 "string-16.cc", 117 "string-16.h", 118 "string-util.cc", 119 "string-util.h", 120 "test-interface.cc", 121 "v8-console-agent-impl.cc", 122 "v8-console-agent-impl.h", 123 "v8-console-message.cc", 124 "v8-console-message.h", 125 "v8-console.cc", 126 "v8-console.h", 127 "v8-debugger-agent-impl.cc", 128 "v8-debugger-agent-impl.h", 129 "v8-debugger-id.cc", 130 "v8-debugger-id.h", 131 "v8-debugger-script.cc", 132 "v8-debugger-script.h", 133 "v8-debugger.cc", 134 "v8-debugger.h", 135 "v8-heap-profiler-agent-impl.cc", 136 "v8-heap-profiler-agent-impl.h", 137 "v8-inspector-impl.cc", 138 "v8-inspector-impl.h", 139 "v8-inspector-session-impl.cc", 140 "v8-inspector-session-impl.h", 141 "v8-profiler-agent-impl.cc", 142 "v8-profiler-agent-impl.h", 143 "v8-regex.cc", 144 "v8-regex.h", 145 "v8-runtime-agent-impl.cc", 146 "v8-runtime-agent-impl.h", 147 "v8-schema-agent-impl.cc", 148 "v8-schema-agent-impl.h", 149 "v8-stack-trace-impl.cc", 150 "v8-stack-trace-impl.h", 151 "v8-value-utils.cc", 152 "v8-value-utils.h", 153 "v8-webdriver-serializer.cc", 154 "v8-webdriver-serializer.h", 155 "value-mirror.cc", 156 "value-mirror.h", 157 ] 158} 159 160#Target to generate all .cc files. 161group("v8_generated_cc_files") { 162 testonly = true 163 164 deps = [ ":protocol_generated_sources" ] 165} 166