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

Side by Side Diff: runtime/observatory/BUILD.gn

Issue 2350583002: Starting work on full GN build (Closed)
Patch Set: Fixes for Fuchsia and Flutter. Cleanup. Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « runtime/bin/zlib/BUILD.gn ('k') | runtime/vm/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 # Currently paths here are hard coded for convenience in building Mojo/Flutter. 5 # Currently paths here are hard coded for convenience in building Mojo/Flutter.
6 declare_args() { 6 declare_args() {
7 # Specify the path to a host compatible version of the Dart SDK. 7 # Specify the path to a host compatible version of the Dart SDK.
8 # This SDK is used to compile the Observatory frontend sources. 8 # This SDK is used to compile the Observatory frontend sources.
9 dart_host_sdk = rebase_path("//third_party/dart-sdk/dart-sdk") 9 dart_host_sdk = rebase_path("//third_party/dart-sdk/dart-sdk")
10 10
(...skipping 23 matching lines...) Expand all
34 deps = [ 34 deps = [
35 ":copy_observatory", 35 ":copy_observatory",
36 ] 36 ]
37 37
38 script = "../../tools/observatory_tool.py" 38 script = "../../tools/observatory_tool.py"
39 39
40 inputs = [ 40 inputs = [
41 rebase_path("pubspec.yaml"), 41 rebase_path("pubspec.yaml"),
42 ] 42 ]
43 43
44 current_dir = rebase_path(".", "//")
44 args = [ 45 args = [
45 "--silent=True", 46 "--silent=True",
46 "--pub-executable", 47 "--pub-executable",
47 dart_host_pub_exe, 48 dart_host_pub_exe,
48 "--directory", 49 "--directory",
49 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 50 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"),
50 "--command", 51 "--command",
51 "rewrite", 52 "rewrite",
52 rebase_path("../observatory/pubspec.yaml"), 53 rebase_path("../observatory/pubspec.yaml"),
53 rebase_path( 54 rebase_path(
54 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"), 55 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml"),
55 "../../third_party/", 56 "../../third_party/",
56 rebase_path("../../third_party/"), 57 rebase_path("../../third_party/"),
57 ] 58 ]
58 59
59 outputs = [ 60 outputs = [
60 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", 61 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml",
61 ] 62 ]
62 } 63 }
63 64
64 action("copy_observatory_deps") { 65 action("copy_observatory_deps") {
65 deps = [ 66 deps = [
66 ":write_observatory_pubspec_yaml", 67 ":write_observatory_pubspec_yaml",
67 ] 68 ]
68 69
69 script = "../../tools/observatory_tool.py" 70 script = "../../tools/observatory_tool.py"
70 71
72 current_dir = rebase_path(".", "//")
71 inputs = [ 73 inputs = [
72 script, 74 script,
73 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", 75 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml",
74 ] 76 ]
75 77
76 args = [ 78 args = [
77 "--silent=True", 79 "--silent=True",
78 "--pub-executable", 80 "--pub-executable",
79 dart_host_pub_exe, 81 dart_host_pub_exe,
80 "--stamp", 82 "--stamp",
81 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/package s.stamp"), 83 rebase_path("$root_gen_dir/observatory_copy/$current_dir/packages.stamp"),
82 "--directory", 84 "--directory",
83 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 85 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"),
84 "--command", 86 "--command",
85 "get", 87 "get",
86 ] 88 ]
87 89
88 outputs = [ 90 outputs = [
89 "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp", 91 "$root_gen_dir/observatory_copy/$current_dir/packages.stamp",
90 ] 92 ]
91 } 93 }
92 94
93 action("pub_build_observatory") { 95 action("pub_build_observatory") {
96 current_dir = rebase_path(".", "//")
94 sources = 97 sources =
95 rebase_path(observatory_sources_gypi.sources, 98 rebase_path(observatory_sources_gypi.sources,
96 "", 99 "",
97 "$root_gen_dir/observatory_copy/dart/runtime/observatory") 100 "$root_gen_dir/observatory_copy/$current_dir")
98 101
99 deps = [ 102 deps = [
100 ":copy_observatory", 103 ":copy_observatory",
101 ":copy_observatory_deps", 104 ":copy_observatory_deps",
102 ] 105 ]
103 106
104 script = "../../tools/observatory_tool.py" 107 script = "../../tools/observatory_tool.py"
105 108
106 inputs = [ 109 inputs = [
107 script, 110 script,
108 "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp", 111 "$root_gen_dir/observatory_copy/$current_dir/packages.stamp",
109 ] 112 ]
110 inputs += sources 113 inputs += sources
111 114
112 args = [ 115 args = [
113 "--silent=True", 116 "--silent=True",
114 "--pub-executable", 117 "--pub-executable",
115 dart_host_pub_exe, 118 dart_host_pub_exe,
116 "--directory", 119 "--directory",
117 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 120 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"),
118 "--command", 121 "--command",
119 "build", 122 "build",
120 rebase_path("$root_out_dir/observatory/build"), 123 rebase_path("$root_out_dir/observatory/build"),
121 ] 124 ]
122 125
123 outputs = [ 126 outputs = [
124 "$root_out_dir/observatory/build/web/main.dart.js", 127 "$root_out_dir/observatory/build/web/main.dart.js",
125 ] 128 ]
126 } 129 }
127 130
(...skipping 17 matching lines...) Expand all
145 rebase_path("$root_out_dir/observatory"), 148 rebase_path("$root_out_dir/observatory"),
146 "--command", 149 "--command",
147 "deploy", 150 "deploy",
148 ] 151 ]
149 152
150 outputs = [ 153 outputs = [
151 "$root_out_dir/observatory/deployed/web/main.dart.js", 154 "$root_out_dir/observatory/deployed/web/main.dart.js",
152 ] 155 ]
153 } 156 }
154 157
155 action("archive_observatory") { 158 template("observatory_archive") {
156 deps = [ 159 assert(defined(invoker.inner_namespace),
157 ":deploy_observatory", 160 "Need inner_namespace in $target_name")
158 ] 161 assert(defined(invoker.outer_namespace),
162 "Need outer_namespace in $target_name")
163 action(target_name) {
164 deps = [
165 ":deploy_observatory",
166 ]
159 167
160 script = "../tools/create_archive.py" 168 script = "../tools/create_archive.py"
161 169
162 inputs = [ 170 inputs = [
163 script, 171 script,
164 "$root_out_dir/observatory/deployed/web/main.dart.js", 172 "$root_out_dir/observatory/deployed/web/main.dart.js",
165 ] 173 ]
166 174
167 args = [ 175 inner_namespace = invoker.inner_namespace
168 "--output", 176 outer_namespace = invoker.outer_namespace
169 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"), 177 output_name = target_name
170 "--tar_output", 178 args = [
171 rebase_path("$root_gen_dir/observatory/observatory_archive.tar"), 179 "--output",
172 "--outer_namespace", "dart", 180 rebase_path("$root_gen_dir/observatory/${output_name}.cc"),
173 "--inner_namespace", "observatory", 181 "--tar_output",
174 "--name", "observatory_assets_archive", 182 rebase_path("$root_gen_dir/observatory/${output_name}.tar"),
175 "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"), 183 "--outer_namespace", outer_namespace,
176 ] 184 "--inner_namespace", inner_namespace,
185 "--name", "observatory_assets_archive",
186 "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"),
187 ]
177 188
178 outputs = [ 189 outputs = [
179 "$root_gen_dir/observatory/observatory_archive.cc", 190 "$root_gen_dir/observatory/${output_name}.cc",
180 "$root_gen_dir/observatory/observatory_archive.tar", 191 "$root_gen_dir/observatory/${output_name}.tar",
181 ] 192 ]
193 }
194 }
195
196 observatory_archive("embedded_archive_observatory") {
197 outer_namespace = "dart"
198 inner_namespace = "observatory"
182 } 199 }
183 200
184 source_set("embedded_observatory_archive") { 201 source_set("embedded_observatory_archive") {
185 deps = [ 202 deps = [
186 ":archive_observatory", 203 ":embedded_archive_observatory",
187 ] 204 ]
188 205
189 sources = [ 206 sources = [
190 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"), 207 rebase_path("$root_gen_dir/observatory/embedded_archive_observatory.cc"),
191 ] 208 ]
192 } 209 }
210
211 observatory_archive("standalone_archive_observatory") {
212 outer_namespace = "dart"
213 inner_namespace = "bin"
214 }
215
216 source_set("standalone_observatory_archive") {
217 deps = [
218 ":standalone_archive_observatory",
219 ]
220
221 sources = [
222 rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"),
223 ]
224 }
OLDNEW
« no previous file with comments | « runtime/bin/zlib/BUILD.gn ('k') | runtime/vm/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698