Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: src/inspector/BUILD.gn

Issue 2184733002: [inspector] add inspector protocol parser test build target. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use separate build file for test Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/inspector/BUILD.gn
diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..ef304db2e17b61999e81e020db57df069171b475
--- /dev/null
+++ b/src/inspector/BUILD.gn
@@ -0,0 +1,111 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+protocol_path = "//third_party/WebKit/Source/platform/inspector_protocol"
+protocol_sources = [
+ "$target_gen_dir/Console.cpp",
+ "$target_gen_dir/Console.h",
+ "$target_gen_dir/Debugger.cpp",
+ "$target_gen_dir/Debugger.h",
+ "$target_gen_dir/HeapProfiler.cpp",
+ "$target_gen_dir/HeapProfiler.h",
+ "$target_gen_dir/Profiler.cpp",
+ "$target_gen_dir/Profiler.h",
+ "$target_gen_dir/Runtime.cpp",
+ "$target_gen_dir/Runtime.h",
+]
+
+action("inspector_protocol_version") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ script = "$protocol_path/generate-inspector-protocol-version"
+ inputs = [
+ "js_protocol.json",
+ ]
+ output_file = "$target_gen_dir/protocol.json"
Michael Achenbach 2016/07/27 13:09:40 Who reads the output_file? The action below depend
Yang 2016/07/27 13:15:14 I blindly took that over from blink. I dug a bit d
Michael Achenbach 2016/07/27 14:16:25 Awesome if it works like this. Hope there is no hi
+ outputs = [
+ output_file,
+ ]
+ args = [
+ "--o",
+ rebase_path(output_file, root_build_dir),
+ rebase_path("js_protocol.json", root_build_dir),
+ ]
+}
+
+action("inspector_protocol_sources") {
+ visibility = [ ":*" ] # Only targets in this file can depend on this.
+ deps = [
+ ":inspector_protocol_version",
+ ]
+ script = "$protocol_path/CodeGenerator.py"
+ sources = [
+ "$protocol_path/CodeGenerator.py",
+ "$protocol_path/Exported_h.template",
+ "$protocol_path/Imported_h.template",
+ "$protocol_path/TypeBuilder_cpp.template",
+ "$protocol_path/TypeBuilder_h.template",
+ ]
+ inputs = [
+ "js_protocol.json",
+ ]
+ outputs = protocol_sources
+ args = [
+ "--protocol",
+ rebase_path("js_protocol.json", root_build_dir),
+ "--string_type",
+ "String",
+ "--export_macro",
+ "PLATFORM_EXPORT",
+ "--output_dir",
+ rebase_path(target_gen_dir, root_build_dir),
+ "--output_package",
+ "inspector",
+ ]
+}
+
+config("inspector_protocol_config") {
+ include_dirs = [
+ "$protocol_path/../..",
+ ]
+ defines = [
+ "V8_INSPECTOR_USE_STL"
+ ]
+}
+
+source_set("inspector_protocol") {
+ deps = [
+ ":inspector_protocol_sources",
+ ]
+ configs += [
+ ":inspector_protocol_config"
+ ]
+ include_dirs = [
+ "$target_gen_dir/..",
+ ]
+ sources = protocol_sources + [
+ "$protocol_path/Allocator.h",
+ "$protocol_path/Array.h",
+ "$protocol_path/BackendCallback.h",
+ "$protocol_path/CodeGenerator.py",
+ "$protocol_path/Collections.h",
+ "$protocol_path/DispatcherBase.cpp",
+ "$protocol_path/DispatcherBase.h",
+ "$protocol_path/ErrorSupport.cpp",
+ "$protocol_path/ErrorSupport.h",
+ "$protocol_path/FrontendChannel.h",
+ "$protocol_path/Maybe.h",
+ "$protocol_path/Object.cpp",
+ "$protocol_path/Object.h",
+ "$protocol_path/Parser.cpp",
+ "$protocol_path/Parser.h",
+ "$protocol_path/Platform.h",
+ "$protocol_path/PlatformSTL.h",
+ "$protocol_path/String16.h",
+ "$protocol_path/String16STL.cpp",
+ "$protocol_path/String16STL.h",
+ "$protocol_path/ValueConversions.h",
+ "$protocol_path/Values.cpp",
+ "$protocol_path/Values.h",
+ ]
+}

Powered by Google App Engine
This is Rietveld 408576698