| OLD | NEW |
| 1 # Copyright 2016 the V8 project authors. All rights reserved. | 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 | 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 protocol_path = "//third_party/WebKit/Source/platform/inspector_protocol" | 5 import("../../gni/v8.gni") |
| 6 protocol_sources = [ | 6 |
| 7 "$target_gen_dir/Console.cpp", | 7 _inspector_protocol = "//third_party/WebKit/Source/platform/inspector_protocol" |
| 8 "$target_gen_dir/Console.h", | 8 import("$_inspector_protocol/inspector_protocol.gni") |
| 9 "$target_gen_dir/Debugger.cpp", | 9 |
| 10 "$target_gen_dir/Debugger.h", | 10 _protocol_generated = [ |
| 11 "$target_gen_dir/HeapProfiler.cpp", | 11 "protocol/Forward.h", |
| 12 "$target_gen_dir/HeapProfiler.h", | 12 "protocol/Protocol.cpp", |
| 13 "$target_gen_dir/Profiler.cpp", | 13 "protocol/Protocol.h", |
| 14 "$target_gen_dir/Profiler.h", | 14 "protocol/Console.cpp", |
| 15 "$target_gen_dir/public/Debugger.h", | 15 "protocol/Console.h", |
| 16 "$target_gen_dir/public/Runtime.h", | 16 "protocol/Debugger.cpp", |
| 17 "$target_gen_dir/Runtime.cpp", | 17 "protocol/Debugger.h", |
| 18 "$target_gen_dir/Runtime.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", |
| 19 ] | 29 ] |
| 20 | 30 |
| 21 action("inspector_protocol_sources") { | 31 action("protocol_compatibility") { |
| 22 visibility = [ ":*" ] # Only targets in this file can depend on this. | 32 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 23 script = "$protocol_path/CodeGenerator.py" | 33 script = "$_inspector_protocol/CheckProtocolCompatibility.py" |
| 24 sources = [ | |
| 25 "$protocol_path/CodeGenerator.py", | |
| 26 "$protocol_path/Exported_h.template", | |
| 27 "$protocol_path/Imported_h.template", | |
| 28 "$protocol_path/TypeBuilder_cpp.template", | |
| 29 "$protocol_path/TypeBuilder_h.template", | |
| 30 ] | |
| 31 inputs = [ | 34 inputs = [ |
| 32 "js_protocol.json", | 35 "js_protocol.json", |
| 33 ] | 36 ] |
| 34 outputs = protocol_sources | 37 _stamp = "$target_gen_dir/js_protocol.stamp" |
| 38 outputs = [ |
| 39 _stamp, |
| 40 ] |
| 35 args = [ | 41 args = [ |
| 36 "--protocol", | 42 "--stamp", |
| 43 rebase_path(_stamp, root_build_dir), |
| 37 rebase_path("js_protocol.json", root_build_dir), | 44 rebase_path("js_protocol.json", root_build_dir), |
| 38 "--string_type", | |
| 39 "String16", | |
| 40 "--export_macro", | |
| 41 "PLATFORM_EXPORT", | |
| 42 "--output_dir", | |
| 43 rebase_path(target_gen_dir, root_build_dir), | |
| 44 "--output_package", | |
| 45 "inspector", | |
| 46 "--exported_dir", | |
| 47 rebase_path("$target_gen_dir/public", root_build_dir), | |
| 48 "--exported_package", | |
| 49 "inspector/public", | |
| 50 ] | 45 ] |
| 51 } | 46 } |
| 52 | 47 |
| 53 config("inspector_protocol_config") { | 48 inspector_protocol_generate("protocol_generated_sources") { |
| 54 include_dirs = [ "$protocol_path/../.." ] | 49 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 55 defines = [ "V8_INSPECTOR_USE_STL" ] | 50 deps = [ |
| 51 ":protocol_compatibility", |
| 52 ] |
| 53 |
| 54 out_dir = target_gen_dir |
| 55 config_file = "inspector_protocol_config.json" |
| 56 inputs = [ |
| 57 "js_protocol.json", |
| 58 "inspector_protocol_config.json", |
| 59 ] |
| 60 outputs = _protocol_generated |
| 61 } |
| 62 |
| 63 action("inspector_injected_script") { |
| 64 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 65 script = "build/xxd.py" |
| 66 inputs = [ |
| 67 "InjectedScriptSource.js", |
| 68 ] |
| 69 outputs = [ |
| 70 "$target_gen_dir/InjectedScriptSource.h", |
| 71 ] |
| 72 args = [ |
| 73 "InjectedScriptSource_js", |
| 74 rebase_path("InjectedScriptSource.js", root_build_dir), |
| 75 rebase_path("$target_gen_dir/InjectedScriptSource.h", root_build_dir), |
| 76 ] |
| 77 } |
| 78 |
| 79 action("inspector_debugger_script") { |
| 80 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 81 script = "build/xxd.py" |
| 82 inputs = [ |
| 83 "DebuggerScript.js", |
| 84 ] |
| 85 outputs = [ |
| 86 "$target_gen_dir/DebuggerScript.h", |
| 87 ] |
| 88 args = [ |
| 89 "DebuggerScript_js", |
| 90 rebase_path("DebuggerScript.js", root_build_dir), |
| 91 rebase_path("$target_gen_dir/DebuggerScript.h", root_build_dir), |
| 92 ] |
| 93 } |
| 94 |
| 95 config("inspector_config") { |
| 96 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 56 cflags = [] | 97 cflags = [] |
| 57 if (is_win) { | 98 if (is_win) { |
| 58 cflags += [ | 99 cflags += [ |
| 59 "/wd4267", # Truncation from size_t to int. | 100 "/wd4267", # Truncation from size_t to int. |
| 60 "/wd4305", # Truncation from 'type1' to 'type2'. | 101 "/wd4305", # Truncation from 'type1' to 'type2'. |
| 61 "/wd4324", # Struct padded due to declspec(align). | 102 "/wd4324", # Struct padded due to declspec(align). |
| 62 "/wd4714", # Function marked forceinline not inlined. | 103 "/wd4714", # Function marked forceinline not inlined. |
| 63 "/wd4800", # Value forced to bool. | 104 "/wd4800", # Value forced to bool. |
| 64 "/wd4996", # Deprecated function call. | 105 "/wd4996", # Deprecated function call. |
| 65 ] | 106 ] |
| 66 } | 107 } |
| 108 if (is_component_build) { |
| 109 defines = [ |
| 110 "V8_SHARED", |
| 111 "BUILDING_V8_SHARED", |
| 112 ] |
| 113 } |
| 67 } | 114 } |
| 68 | 115 |
| 69 source_set("inspector_protocol") { | 116 v8_source_set("inspector") { |
| 70 deps = [ | 117 deps = [ |
| 71 ":inspector_protocol_sources", | 118 ":inspector_debugger_script", |
| 119 ":inspector_injected_script", |
| 120 ":protocol_generated_sources", |
| 72 ] | 121 ] |
| 73 configs += [ ":inspector_protocol_config" ] | 122 configs = [ ":inspector_config" ] |
| 74 include_dirs = [ "$target_gen_dir/.." ] | 123 include_dirs = [ |
| 75 sources = protocol_sources + [ | 124 "../..", |
| 76 "$protocol_path/Allocator.h", | 125 "../../include", |
| 77 "$protocol_path/Array.h", | 126 "$target_gen_dir/../..", |
| 78 "$protocol_path/BackendCallback.h", | 127 "$target_gen_dir/../../include", |
| 79 "$protocol_path/CodeGenerator.py", | 128 ] |
| 80 "$protocol_path/Collections.h", | 129 sources = rebase_path(_protocol_generated, ".", target_gen_dir) |
| 81 "$protocol_path/DispatcherBase.cpp", | 130 sources += [ |
| 82 "$protocol_path/DispatcherBase.h", | 131 "../../include/v8-inspector-protocol.h", |
| 83 "$protocol_path/ErrorSupport.cpp", | 132 "../../include/v8-inspector.h", |
| 84 "$protocol_path/ErrorSupport.h", | 133 ] |
| 85 "$protocol_path/FrontendChannel.h", | 134 sources += get_target_outputs(":inspector_injected_script") |
| 86 "$protocol_path/Maybe.h", | 135 sources += get_target_outputs(":inspector_debugger_script") |
| 87 "$protocol_path/Object.cpp", | 136 sources += [ |
| 88 "$protocol_path/Object.h", | 137 "Allocator.h", |
| 89 "$protocol_path/Parser.cpp", | 138 "Atomics.h", |
| 90 "$protocol_path/Parser.h", | 139 "InjectedScript.cpp", |
| 91 "$protocol_path/Platform.h", | 140 "InjectedScript.h", |
| 92 "$protocol_path/PlatformSTL.h", | 141 "InjectedScriptNative.cpp", |
| 93 "$protocol_path/String16.cpp", | 142 "InjectedScriptNative.h", |
| 94 "$protocol_path/String16.h", | 143 "InspectedContext.cpp", |
| 95 "$protocol_path/String16STL.cpp", | 144 "InspectedContext.h", |
| 96 "$protocol_path/String16STL.h", | 145 "JavaScriptCallFrame.cpp", |
| 97 "$protocol_path/ValueConversions.h", | 146 "JavaScriptCallFrame.h", |
| 98 "$protocol_path/Values.cpp", | 147 "ProtocolPlatform.h", |
| 99 "$protocol_path/Values.h", | 148 "RemoteObjectId.cpp", |
| 100 ] | 149 "RemoteObjectId.h", |
| 150 "ScriptBreakpoint.h", |
| 151 "SearchUtil.cpp", |
| 152 "SearchUtil.h", |
| 153 "String16.cpp", |
| 154 "String16.h", |
| 155 "StringUtil.cpp", |
| 156 "StringUtil.h", |
| 157 "V8Console.cpp", |
| 158 "V8Console.h", |
| 159 "V8ConsoleAgentImpl.cpp", |
| 160 "V8ConsoleAgentImpl.h", |
| 161 "V8ConsoleMessage.cpp", |
| 162 "V8ConsoleMessage.h", |
| 163 "V8Debugger.cpp", |
| 164 "V8Debugger.h", |
| 165 "V8DebuggerAgentImpl.cpp", |
| 166 "V8DebuggerAgentImpl.h", |
| 167 "V8DebuggerScript.cpp", |
| 168 "V8DebuggerScript.h", |
| 169 "V8FunctionCall.cpp", |
| 170 "V8FunctionCall.h", |
| 171 "V8HeapProfilerAgentImpl.cpp", |
| 172 "V8HeapProfilerAgentImpl.h", |
| 173 "V8InjectedScriptHost.cpp", |
| 174 "V8InjectedScriptHost.h", |
| 175 "V8InspectorImpl.cpp", |
| 176 "V8InspectorImpl.h", |
| 177 "V8InspectorSessionImpl.cpp", |
| 178 "V8InspectorSessionImpl.h", |
| 179 "V8InternalValueType.cpp", |
| 180 "V8InternalValueType.h", |
| 181 "V8ProfilerAgentImpl.cpp", |
| 182 "V8ProfilerAgentImpl.h", |
| 183 "V8Regex.cpp", |
| 184 "V8Regex.h", |
| 185 "V8RuntimeAgentImpl.cpp", |
| 186 "V8RuntimeAgentImpl.h", |
| 187 "V8SchemaAgentImpl.cpp", |
| 188 "V8SchemaAgentImpl.h", |
| 189 "V8StackTraceImpl.cpp", |
| 190 "V8StackTraceImpl.h", |
| 191 "V8ValueCopier.cpp", |
| 192 "V8ValueCopier.h", |
| 193 ] |
| 101 } | 194 } |
| OLD | NEW |