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

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

Issue 2451613005: Format GN files and add a presubmit check that GN is properly formatted (Closed)
Patch Set: Fix gn args Created 4 years, 1 month 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/third_party/double-conversion/src/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
11 # Specify the path to a host compatible version of pub. 11 # Specify the path to a host compatible version of pub.
12 # This is used to compile the Observatory frontend sources. 12 # This is used to compile the Observatory frontend sources.
13 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub") 13 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub")
14 } 14 }
15 15
16 # Helper build rules for packaging the Dart observatory resources. 16 # Helper build rules for packaging the Dart observatory resources.
17 observatory_sources_gypi = 17 observatory_sources_gypi =
18 exec_script("../../tools/gypi_to_gn.py", 18 exec_script("../../tools/gypi_to_gn.py",
19 [ rebase_path( 19 [ rebase_path("../observatory/observatory_sources.gypi") ],
20 "../observatory/observatory_sources.gypi") ],
21 "scope", 20 "scope",
22 [ "../observatory/observatory_sources.gypi" ]) 21 [ "../observatory/observatory_sources.gypi" ])
23 22
24 copy("copy_observatory") { 23 copy("copy_observatory") {
25 sources = rebase_path(observatory_sources_gypi.sources, 24 sources = rebase_path(observatory_sources_gypi.sources, "", ".")
26 "",
27 ".")
28 outputs = [ 25 outputs = [
29 "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_p art}}", 26 "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_p art}}",
30 ] 27 ]
31 } 28 }
32 29
33 action("write_observatory_pubspec_yaml") { 30 action("write_observatory_pubspec_yaml") {
34 deps = [ 31 deps = [
35 ":copy_observatory", 32 ":copy_observatory",
36 ] 33 ]
37 34
38 script = "../../tools/observatory_tool.py" 35 script = "../../tools/observatory_tool.py"
39 36
40 inputs = [ 37 inputs = [
41 rebase_path("pubspec.yaml"), 38 rebase_path("pubspec.yaml"),
42 ] 39 ]
43 40
44 current_dir = rebase_path(".", "//") 41 current_dir = rebase_path(".", "//")
45 args = [ 42 args = [
46 "--silent=True", 43 "--silent=True",
47 "--pub-executable", 44 "--pub-executable",
48 dart_host_pub_exe, 45 dart_host_pub_exe,
49 "--directory", 46 "--directory",
50 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"), 47 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"),
51 "--command", 48 "--command",
52 "rewrite", 49 "rewrite",
53 rebase_path("../observatory/pubspec.yaml"), 50 rebase_path("../observatory/pubspec.yaml"),
54 rebase_path( 51 rebase_path("$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml"),
55 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml"),
56 "../../third_party/", 52 "../../third_party/",
57 rebase_path("../../third_party/"), 53 rebase_path("../../third_party/"),
58 ] 54 ]
59 55
60 outputs = [ 56 outputs = [
61 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml", 57 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml",
62 ] 58 ]
63 } 59 }
64 60
65 action("copy_observatory_deps") { 61 action("copy_observatory_deps") {
(...skipping 21 matching lines...) Expand all
87 "get", 83 "get",
88 ] 84 ]
89 85
90 outputs = [ 86 outputs = [
91 "$root_gen_dir/observatory_copy/$current_dir/packages.stamp", 87 "$root_gen_dir/observatory_copy/$current_dir/packages.stamp",
92 ] 88 ]
93 } 89 }
94 90
95 action("pub_build_observatory") { 91 action("pub_build_observatory") {
96 current_dir = rebase_path(".", "//") 92 current_dir = rebase_path(".", "//")
97 sources = 93 sources = rebase_path(observatory_sources_gypi.sources,
98 rebase_path(observatory_sources_gypi.sources, 94 "",
99 "", 95 "$root_gen_dir/observatory_copy/$current_dir")
100 "$root_gen_dir/observatory_copy/$current_dir")
101 96
102 deps = [ 97 deps = [
103 ":copy_observatory", 98 ":copy_observatory",
104 ":copy_observatory_deps", 99 ":copy_observatory_deps",
105 ] 100 ]
106 101
107 script = "../../tools/observatory_tool.py" 102 script = "../../tools/observatory_tool.py"
108 103
109 inputs = [ 104 inputs = [
110 script, 105 script,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 ] 172 ]
178 173
179 inner_namespace = invoker.inner_namespace 174 inner_namespace = invoker.inner_namespace
180 outer_namespace = invoker.outer_namespace 175 outer_namespace = invoker.outer_namespace
181 output_name = target_name 176 output_name = target_name
182 args = [ 177 args = [
183 "--output", 178 "--output",
184 rebase_path("$root_gen_dir/observatory/${output_name}.cc"), 179 rebase_path("$root_gen_dir/observatory/${output_name}.cc"),
185 "--tar_output", 180 "--tar_output",
186 rebase_path("$root_gen_dir/observatory/${output_name}.tar"), 181 rebase_path("$root_gen_dir/observatory/${output_name}.tar"),
187 "--outer_namespace", outer_namespace, 182 "--outer_namespace",
188 "--inner_namespace", inner_namespace, 183 outer_namespace,
189 "--name", "observatory_assets_archive", 184 "--inner_namespace",
190 "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"), 185 inner_namespace,
186 "--name",
187 "observatory_assets_archive",
188 "--client_root",
189 rebase_path("$root_out_dir/observatory/deployed/web/"),
191 ] 190 ]
192 if (enable_compression) { 191 if (enable_compression) {
193 args += [ "--compress" ] 192 args += [ "--compress" ]
194 } 193 }
195 194
196 outputs = [ 195 outputs = [
197 "$root_gen_dir/observatory/${output_name}.cc", 196 "$root_gen_dir/observatory/${output_name}.cc",
198 "$root_gen_dir/observatory/${output_name}.tar", 197 "$root_gen_dir/observatory/${output_name}.tar",
199 ] 198 ]
200 } 199 }
(...skipping 22 matching lines...) Expand all
223 222
224 source_set("standalone_observatory_archive") { 223 source_set("standalone_observatory_archive") {
225 deps = [ 224 deps = [
226 ":standalone_archive_observatory", 225 ":standalone_archive_observatory",
227 ] 226 ]
228 227
229 sources = [ 228 sources = [
230 rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"), 229 rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"),
231 ] 230 ]
232 } 231 }
OLDNEW
« no previous file with comments | « runtime/bin/zlib/BUILD.gn ('k') | runtime/third_party/double-conversion/src/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698