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

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

Issue 2472813002: [gn] Consolidate exec_script calls to speed up generation (Closed)
Patch Set: fix paths to sources in generate_patched_sdk 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/gypi_contents.gni ('k') | runtime/vm/gypi_contents.gni » ('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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 import("../../build/executable_suffix.gni") 5 import("../../build/executable_suffix.gni")
6 import("../../build/prebuilt_dart_sdk.gni") 6 import("../../build/prebuilt_dart_sdk.gni")
7 import("gypi_contents.gni")
7 8
8 config("libdart_vm_config") { 9 config("libdart_vm_config") {
9 if (defined(is_fuchsia) && is_fuchsia) { 10 if (defined(is_fuchsia) && is_fuchsia) {
10 libs = [ "magenta" ] 11 libs = [ "magenta" ]
11 } else if (is_win) { 12 } else if (is_win) {
12 libs = [ 13 libs = [
13 "advapi32.lib", 14 "advapi32.lib",
14 "shell32.lib", 15 "shell32.lib",
15 "dbghelp.lib", 16 "dbghelp.lib",
16 ] 17 ]
17 } else { 18 } else {
18 libs = [ "dl" ] 19 libs = [ "dl" ]
19 if (!is_android) { 20 if (!is_android) {
20 libs += [ "pthread" ] 21 libs += [ "pthread" ]
21 } 22 }
22 if (is_linux) { 23 if (is_linux) {
23 libs += [ "rt" ] 24 libs += [ "rt" ]
24 } 25 }
25 } 26 }
26 } 27 }
27 28
28 static_library("libdart_platform") { 29 static_library("libdart_platform") {
29 configs += [ 30 configs += [
30 "..:dart_config", 31 "..:dart_config",
31 "..:dart_maybe_product_config", 32 "..:dart_maybe_product_config",
32 ] 33 ]
33 public_configs = [ ":libdart_vm_config" ] 34 public_configs = [ ":libdart_vm_config" ]
34 35
35 platform_headers_gypi = 36 sources = rebase_path(processed_gypis.platform_sources, ".", "../platform")
36 exec_script("../../tools/gypi_to_gn.py",
37 [ rebase_path("../platform/platform_headers.gypi") ],
38 "scope",
39 [ "../platform/platform_headers.gypi" ])
40 platform_headers =
41 rebase_path(platform_headers_gypi.sources, ".", "../platform")
42 37
43 platform_sources_gypi =
44 exec_script("../../tools/gypi_to_gn.py",
45 [ rebase_path("../platform/platform_sources.gypi") ],
46 "scope",
47 [ "../platform/platform_sources.gypi" ])
48 platform_sources =
49 rebase_path(platform_sources_gypi.sources, ".", "../platform")
50
51 sources = platform_headers + platform_sources
52 include_dirs = [ ".." ] 38 include_dirs = [ ".." ]
53 } 39 }
54 40
55 vm_sources_list = exec_script("../../tools/gypi_to_gn.py", 41 vm_sources_list = processed_gypis.vm_sources
56 [ rebase_path("vm_sources.gypi") ],
57 "scope",
58 [ "vm_sources.gypi" ])
59 42
60 static_library("libdart_vm") { 43 static_library("libdart_vm") {
61 configs += [ 44 configs += [
62 "..:dart_config", 45 "..:dart_config",
63 "..:dart_maybe_product_config", 46 "..:dart_maybe_product_config",
64 "..:dart_maybe_precompiled_runtime_config", 47 "..:dart_maybe_precompiled_runtime_config",
65 ] 48 ]
66 public_configs = [ ":libdart_vm_config" ] 49 public_configs = [ ":libdart_vm_config" ]
67 set_sources_assignment_filter([ 50 set_sources_assignment_filter([
68 "*_test.cc", 51 "*_test.cc",
69 "*_test.h", 52 "*_test.h",
70 ]) 53 ])
71 sources = vm_sources_list.sources 54 sources = vm_sources_list
72 include_dirs = [ ".." ] 55 include_dirs = [ ".." ]
73 } 56 }
74 57
75 static_library("libdart_vm_noopt") { 58 static_library("libdart_vm_noopt") {
76 configs += [ 59 configs += [
77 "..:dart_config", 60 "..:dart_config",
78 "..:dart_maybe_product_config", 61 "..:dart_maybe_product_config",
79 "..:dart_precompiler_config", 62 "..:dart_precompiler_config",
80 "..:dart_maybe_precompiled_runtime_config", 63 "..:dart_maybe_precompiled_runtime_config",
81 ] 64 ]
82 public_configs = [ ":libdart_vm_config" ] 65 public_configs = [ ":libdart_vm_config" ]
83 set_sources_assignment_filter([ 66 set_sources_assignment_filter([
84 "*_test.cc", 67 "*_test.cc",
85 "*_test.h", 68 "*_test.h",
86 ]) 69 ])
87 sources = vm_sources_list.sources 70 sources = vm_sources_list
88 include_dirs = [ ".." ] 71 include_dirs = [ ".." ]
89 } 72 }
90 73
91 static_library("libdart_vm_precompiled_runtime") { 74 static_library("libdart_vm_precompiled_runtime") {
92 configs += [ 75 configs += [
93 "..:dart_config", 76 "..:dart_config",
94 "..:dart_maybe_product_config", 77 "..:dart_maybe_product_config",
95 "..:dart_precompiled_runtime_config", 78 "..:dart_precompiled_runtime_config",
96 ] 79 ]
97 public_configs = [ ":libdart_vm_config" ] 80 public_configs = [ ":libdart_vm_config" ]
98 set_sources_assignment_filter([ 81 set_sources_assignment_filter([
99 "*_test.cc", 82 "*_test.cc",
100 "*_test.h", 83 "*_test.h",
101 ]) 84 ])
102 sources = vm_sources_list.sources 85 sources = vm_sources_list
103 include_dirs = [ ".." ] 86 include_dirs = [ ".." ]
104 } 87 }
105 88
106 static_library("libdart_vm_nosnapshot") { 89 static_library("libdart_vm_nosnapshot") {
107 configs += [ 90 configs += [
108 "..:dart_config", 91 "..:dart_config",
109 "..:dart_maybe_product_config", 92 "..:dart_maybe_product_config",
110 "..:dart_maybe_precompiled_runtime_config", 93 "..:dart_maybe_precompiled_runtime_config",
111 "..:dart_no_snapshot_config", 94 "..:dart_no_snapshot_config",
112 ] 95 ]
113 public_configs = [ ":libdart_vm_config" ] 96 public_configs = [ ":libdart_vm_config" ]
114 set_sources_assignment_filter([ 97 set_sources_assignment_filter([
115 "*_test.cc", 98 "*_test.cc",
116 "*_test.h", 99 "*_test.h",
117 ]) 100 ])
118 sources = vm_sources_list.sources 101 sources = vm_sources_list
119 include_dirs = [ ".." ] 102 include_dirs = [ ".." ]
120 } 103 }
121 104
122 static_library("libdart_vm_nosnapshot_precompiled_runtime") { 105 static_library("libdart_vm_nosnapshot_precompiled_runtime") {
123 configs += [ 106 configs += [
124 "..:dart_config", 107 "..:dart_config",
125 "..:dart_maybe_product_config", 108 "..:dart_maybe_product_config",
126 "..:dart_precompiled_runtime_config", 109 "..:dart_precompiled_runtime_config",
127 "..:dart_no_snapshot_config", 110 "..:dart_no_snapshot_config",
128 ] 111 ]
129 public_configs = [ ":libdart_vm_config" ] 112 public_configs = [ ":libdart_vm_config" ]
130 set_sources_assignment_filter([ 113 set_sources_assignment_filter([
131 "*_test.cc", 114 "*_test.cc",
132 "*_test.h", 115 "*_test.h",
133 ]) 116 ])
134 sources = vm_sources_list.sources 117 sources = vm_sources_list
135 include_dirs = [ ".." ] 118 include_dirs = [ ".." ]
136 } 119 }
137 120
138 static_library("libdart_vm_nosnapshot_with_precompiler") { 121 static_library("libdart_vm_nosnapshot_with_precompiler") {
139 configs += [ 122 configs += [
140 "..:dart_config", 123 "..:dart_config",
141 "..:dart_maybe_product_config", 124 "..:dart_maybe_product_config",
142 "..:dart_precompiler_config", 125 "..:dart_precompiler_config",
143 "..:dart_no_snapshot_config", 126 "..:dart_no_snapshot_config",
144 ] 127 ]
145 public_configs = [ ":libdart_vm_config" ] 128 public_configs = [ ":libdart_vm_config" ]
146 set_sources_assignment_filter([ 129 set_sources_assignment_filter([
147 "*_test.cc", 130 "*_test.cc",
148 "*_test.h", 131 "*_test.h",
149 ]) 132 ])
150 sources = vm_sources_list.sources 133 sources = vm_sources_list
151 include_dirs = [ ".." ] 134 include_dirs = [ ".." ]
152 } 135 }
153 136
154 template("process_library_source") { 137 template("process_library_source") {
155 assert(defined(invoker.filename), "Need filename in $target_name") 138 assert(defined(invoker.libsources), "Need libsources in $target_name")
156 assert(defined(invoker.output), "Need output in $target_name") 139 assert(defined(invoker.output), "Need output in $target_name")
157 assert(defined(invoker.path), "Need path in $target_name")
158 action(target_name) { 140 action(target_name) {
159 visibility = [ ":*" ] # Only targets in this file can see this. 141 visibility = [ ":*" ] # Only targets in this file can see this.
160 filename = invoker.filename 142 libsources = invoker.libsources
161 path = invoker.path
162
163 lib_sources_gypi =
164 exec_script("../../tools/gypi_to_gn.py",
165 [ rebase_path("${path}/${filename}_sources.gypi") ],
166 "scope",
167 [ "${path}/${filename}_sources.gypi" ])
168 lib_sources = rebase_path(lib_sources_gypi.sources, ".", path)
169 143
170 script = invoker.script 144 script = invoker.script
171 inputs = invoker.inputs + [ script ] 145 inputs = invoker.inputs + libsources
172 inputs += lib_sources
173 outputs = [ 146 outputs = [
174 invoker.output, 147 invoker.output,
175 ] 148 ]
176 args = invoker.args + rebase_path(lib_sources, root_build_dir) 149 args = invoker.args + rebase_path(libsources, root_build_dir)
177 } 150 }
178 } 151 }
179 152
180 template("generate_library_source") { 153 template("generate_library_source") {
181 assert(defined(invoker.libname), "Need libname in $target_name") 154 assert(defined(invoker.libname), "Need libname in $target_name")
182 assert(defined(invoker.filename), "Need a filename in $target_name") 155 assert(defined(invoker.libsources), "Need libsources in $target_name")
183 assert(defined(invoker.kind), "Need kind in $target_name") 156 assert(defined(invoker.kind), "Need kind in $target_name")
184 assert(defined(invoker.output), "Need output in $target_name") 157 assert(defined(invoker.output), "Need output in $target_name")
185 assert(defined(invoker.path), "Need path in $target_name")
186 158
187 process_library_source(target_name) { 159 process_library_source(target_name) {
188 libname = invoker.libname 160 libname = invoker.libname
189 filename = invoker.filename 161 libsources = invoker.libsources
190 kind = invoker.kind 162 kind = invoker.kind
191 output = invoker.output
192 path = invoker.path
193 script = "../tools/gen_library_src_paths.py" 163 script = "../tools/gen_library_src_paths.py"
194 inputs = [ 164 inputs = [
195 "../lib/libgen_in.cc", 165 "../lib/libgen_in.cc",
196 ] 166 ]
167 output = invoker.output
197 args = [ 168 args = [
198 "--output", 169 "--output",
199 rebase_path(invoker.output, root_build_dir), 170 rebase_path(invoker.output, root_build_dir),
200 "--input_cc", 171 "--input_cc",
201 rebase_path("../lib/libgen_in.cc", root_build_dir), 172 rebase_path("../lib/libgen_in.cc", root_build_dir),
202 "--include", 173 "--include",
203 "vm/bootstrap.h", 174 "vm/bootstrap.h",
204 "--var_name", 175 "--var_name",
205 "dart::Bootstrap::${libname}_${kind}_paths_", 176 "dart::Bootstrap::${libname}_${kind}_paths_",
206 "--library_name", 177 "--library_name",
207 "dart:${libname}", 178 "dart:${libname}",
208 ] 179 ]
209 } 180 }
210 } 181 }
211 182
212 # This templates expects invoker.sources to be a list of pairs of strings. 183 # This templates expects invoker.sources to be a list of lists.
213 # The pairs of strings mean the following. 184 # The lists contain the following information about each library:
214 # library name, file name 185 # library name (string)
215 # e.g. for the "internal" library named "dart:_internal", 186 # library sources (list of strings)
216 # with sources listed at sdk/lib/internal/internal_sources.gypi and 187 # library source base path (string)
217 # lib/internal_sources.gypi, we have: ["_internal", "internal"] 188 # filename (string)
189 # do_patch (boolean)
190 #
191 # If do_patch is true, the lists additionally contains
192 # patch sources (list of strings)
193 # patch source base path (string)
218 # 194 #
219 # The template iterates over the list, and generates generate_library_source 195 # The template iterates over the list, and generates generate_library_source
220 # actions for each. After that, it generates targets to compile the generated 196 # actions for each. After that, it generates targets to compile the generated
221 # sources to make libdart_lib_nosnapshot and libdart_lib. 197 # sources to make libdart_lib_*.
222 template("generate_core_libraries") { 198 template("generate_core_libraries") {
223 assert(defined(invoker.sources), "Need sources in $target_name") 199 assert(defined(invoker.sources), "Need sources in $target_name")
200 assert(defined(invoker.allsources), "Need allsources in $target_name")
224 liboutputs = [] 201 liboutputs = []
225 libsources = []
226 libdeps = [] 202 libdeps = []
227 foreach(lib, invoker.sources) { 203 foreach(lib, invoker.sources) {
228 libname = lib[0] 204 libname = lib[0]
229 filename = lib[1] 205 filename = lib[3]
230 do_patch = lib[2] 206 do_patch = lib[4]
231 source_path = lib[3]
232 generate_library_source("generate_${filename}_cc_file") { 207 generate_library_source("generate_${filename}_cc_file") {
233 libname = libname 208 libname = libname
234 filename = filename 209 libsources = rebase_path(lib[1], ".", lib[2])
235 kind = "source" 210 kind = "source"
236 path = source_path
237 output = "$target_gen_dir/${filename}_gen.cc" 211 output = "$target_gen_dir/${filename}_gen.cc"
238 } 212 }
239 if (do_patch) { 213 if (do_patch) {
240 patch_path = lib[4]
241 generate_library_source("generate_${filename}_patch_cc_file") { 214 generate_library_source("generate_${filename}_patch_cc_file") {
242 libname = libname 215 libname = libname
243 filename = filename 216 libsources = rebase_path(lib[5], ".", lib[6])
244 kind = "patch" 217 kind = "patch"
245 path = patch_path
246 output = "$target_gen_dir/${filename}_patch_gen.cc" 218 output = "$target_gen_dir/${filename}_patch_gen.cc"
247 } 219 }
248 } 220 }
249 lib_sources_gypi = { 221
250 }
251 lib_sources_gypi =
252 exec_script("../../tools/gypi_to_gn.py",
253 [ rebase_path("../lib/${filename}_sources.gypi") ],
254 "scope",
255 [ "../lib/${filename}_sources.gypi" ])
256 libsources += rebase_path(lib_sources_gypi.sources, ".", "../lib")
257 liboutputs += [ "$target_gen_dir/${filename}_gen.cc" ] 222 liboutputs += [ "$target_gen_dir/${filename}_gen.cc" ]
258 libdeps += [ ":generate_${filename}_cc_file" ] 223 libdeps += [ ":generate_${filename}_cc_file" ]
259 if (do_patch) { 224 if (do_patch) {
260 liboutputs += [ "$target_gen_dir/${filename}_patch_gen.cc" ] 225 liboutputs += [ "$target_gen_dir/${filename}_patch_gen.cc" ]
261 libdeps += [ ":generate_${filename}_patch_cc_file" ] 226 libdeps += [ ":generate_${filename}_patch_cc_file" ]
262 } 227 }
263 } 228 }
264 229
230 all_libsources = rebase_path(invoker.allsources, ".", "../lib")
231
265 static_library("libdart_lib_nosnapshot") { 232 static_library("libdart_lib_nosnapshot") {
266 configs += [ 233 configs += [
267 "..:dart_config", 234 "..:dart_config",
268 "..:dart_maybe_product_config", 235 "..:dart_maybe_product_config",
269 "..:dart_maybe_precompiled_runtime_config", 236 "..:dart_maybe_precompiled_runtime_config",
270 ] 237 ]
271 deps = libdeps 238 deps = libdeps
272 sources = libsources + [ "bootstrap.cc" ] + liboutputs 239 sources = all_libsources + [ "bootstrap.cc" ] + liboutputs
273 include_dirs = [ ".." ] 240 include_dirs = [ ".." ]
274 } 241 }
275 static_library("libdart_lib_nosnapshot_precompiled_runtime") { 242 static_library("libdart_lib_nosnapshot_precompiled_runtime") {
276 configs += [ 243 configs += [
277 "..:dart_config", 244 "..:dart_config",
278 "..:dart_maybe_product_config", 245 "..:dart_maybe_product_config",
279 "..:dart_precompiled_runtime_config", 246 "..:dart_precompiled_runtime_config",
280 ] 247 ]
281 deps = libdeps 248 deps = libdeps
282 sources = libsources + [ "bootstrap.cc" ] + liboutputs 249 sources = all_libsources + [ "bootstrap.cc" ] + liboutputs
283 include_dirs = [ ".." ] 250 include_dirs = [ ".." ]
284 } 251 }
285 static_library("libdart_lib_nosnapshot_with_precompiler") { 252 static_library("libdart_lib_nosnapshot_with_precompiler") {
286 configs += [ 253 configs += [
287 "..:dart_config", 254 "..:dart_config",
288 "..:dart_maybe_product_config", 255 "..:dart_maybe_product_config",
289 "..:dart_precompiler_config", 256 "..:dart_precompiler_config",
290 ] 257 ]
291 deps = libdeps 258 deps = libdeps
292 sources = libsources + [ "bootstrap.cc" ] + liboutputs 259 sources = all_libsources + [ "bootstrap.cc" ] + liboutputs
293 include_dirs = [ ".." ] 260 include_dirs = [ ".." ]
294 } 261 }
295 static_library("libdart_lib") { 262 static_library("libdart_lib") {
296 configs += [ 263 configs += [
297 "..:dart_config", 264 "..:dart_config",
298 "..:dart_maybe_product_config", 265 "..:dart_maybe_product_config",
299 "..:dart_maybe_precompiled_runtime_config", 266 "..:dart_maybe_precompiled_runtime_config",
300 ] 267 ]
301 sources = libsources + [ "bootstrap_nocore.cc" ] 268 sources = all_libsources + [ "bootstrap_nocore.cc" ]
302 include_dirs = [ ".." ] 269 include_dirs = [ ".." ]
303 } 270 }
304 static_library("libdart_lib_precompiled_runtime") { 271 static_library("libdart_lib_precompiled_runtime") {
305 configs += [ 272 configs += [
306 "..:dart_config", 273 "..:dart_config",
307 "..:dart_maybe_product_config", 274 "..:dart_maybe_product_config",
308 "..:dart_precompiled_runtime_config", 275 "..:dart_precompiled_runtime_config",
309 ] 276 ]
310 sources = libsources + [ "bootstrap_nocore.cc" ] 277 sources = all_libsources + [ "bootstrap_nocore.cc" ]
311 include_dirs = [ ".." ] 278 include_dirs = [ ".." ]
312 } 279 }
313 } 280 }
314 281
315 generate_core_libraries("core_libraries") { 282 generate_core_libraries("core_libraries") {
316 sources = [ 283 sources = [
317 [ 284 [
318 "async", 285 "async",
286 processed_gypis.async_sdk_sources,
287 "../../sdk/lib/async",
319 "async", 288 "async",
320 true, 289 true,
321 "../../sdk/lib/async", 290 processed_gypis.async_runtime_sources,
322 "../lib", 291 "../lib",
323 ], 292 ],
324 [ 293 [
325 "core", 294 "core",
295 processed_gypis.core_sdk_sources,
296 "../../sdk/lib/core",
326 "core", 297 "core",
327 true, 298 true,
328 "../../sdk/lib/core", 299 processed_gypis.core_runtime_sources,
329 "../lib", 300 "../lib",
330 ], 301 ],
331 [ 302 [
332 "collection", 303 "collection",
304 processed_gypis.collection_sdk_sources,
305 "../../sdk/lib/collection",
333 "collection", 306 "collection",
334 true, 307 true,
335 "../../sdk/lib/collection", 308 processed_gypis.collection_runtime_sources,
336 "../lib", 309 "../lib",
337 ], 310 ],
338 [ 311 [
339 "convert", 312 "convert",
313 processed_gypis.convert_sdk_sources,
314 "../../sdk/lib/convert",
340 "convert", 315 "convert",
341 true, 316 true,
342 "../../sdk/lib/convert", 317 processed_gypis.convert_runtime_sources,
343 "../lib", 318 "../lib",
344 ], 319 ],
345 [ 320 [
346 "developer", 321 "developer",
322 processed_gypis.developer_sdk_sources,
323 "../../sdk/lib/developer",
347 "developer", 324 "developer",
348 true, 325 true,
349 "../../sdk/lib/developer", 326 processed_gypis.developer_runtime_sources,
350 "../lib", 327 "../lib",
351 ], 328 ],
352 [ 329 [
353 "_internal", 330 "_internal",
331 processed_gypis.internal_sdk_sources,
332 "../../sdk/lib/internal",
354 "internal", 333 "internal",
355 true, 334 true,
356 "../../sdk/lib/internal", 335 processed_gypis.internal_runtime_sources,
357 "../lib", 336 "../lib",
358 ], 337 ],
359 [ 338 [
360 "isolate", 339 "isolate",
340 processed_gypis.isolate_sdk_sources,
341 "../../sdk/lib/isolate",
361 "isolate", 342 "isolate",
362 true, 343 true,
363 "../../sdk/lib/isolate", 344 processed_gypis.isolate_runtime_sources,
364 "../lib", 345 "../lib",
365 ], 346 ],
366 [ 347 [
367 "math", 348 "math",
349 processed_gypis.math_sdk_sources,
350 "../../sdk/lib/math",
368 "math", 351 "math",
369 true, 352 true,
370 "../../sdk/lib/math", 353 processed_gypis.math_runtime_sources,
371 "../lib", 354 "../lib",
372 ], 355 ],
373 [ 356 [
374 "mirrors", 357 "mirrors",
358 processed_gypis.mirrors_sdk_sources,
359 "../../sdk/lib/mirrors",
375 "mirrors", 360 "mirrors",
376 true, 361 true,
377 "../../sdk/lib/mirrors", 362 processed_gypis.mirrors_runtime_sources,
378 "../lib", 363 "../lib",
379 ], 364 ],
380 [ 365 [
381 "profiler", 366 "profiler",
367 processed_gypis.profiler_sdk_sources,
368 "../../sdk/lib/profiler",
382 "profiler", 369 "profiler",
383 false, 370 false,
384 "../../sdk/lib/profiler",
385 ], 371 ],
386 [ 372 [
387 "typed_data", 373 "typed_data",
374 processed_gypis.typed_data_runtime_sources,
375 "../lib",
388 "typed_data", 376 "typed_data",
389 false, 377 false,
390 "../lib",
391 ], 378 ],
392 [ 379 [
393 "_vmservice", 380 "_vmservice",
381 processed_gypis.vmservice_sdk_sources,
382 "../../sdk/lib/vmservice",
394 "vmservice", 383 "vmservice",
395 true, 384 true,
396 "../../sdk/lib/vmservice", 385 processed_gypis.vmservice_runtime_sources,
397 "../lib", 386 "../lib",
398 ], 387 ],
399 ] 388 ]
389 allsources = processed_gypis.allsources
400 } 390 }
401 391
402 template("concatenate_patch") { 392 template("concatenate_patch") {
403 assert(defined(invoker.libname), "Need a name in $target_name") 393 assert(defined(invoker.libsources), "Need a sources in $target_name")
404 assert(defined(invoker.dir), "Need a dir in $target_name")
405 assert(defined(invoker.output), "Need an output in $target_name") 394 assert(defined(invoker.output), "Need an output in $target_name")
406 395
407 process_library_source(target_name) { 396 process_library_source(target_name) {
397 libsources = invoker.libsources
398 inputs = []
408 output = invoker.output 399 output = invoker.output
409 path = "../${invoker.dir}"
410 filename = invoker.libname
411 script = "../tools/concatenate_patches.py" 400 script = "../tools/concatenate_patches.py"
412 args = [ 401 args = [
413 "--output", 402 "--output",
414 rebase_path(output, root_build_dir), 403 rebase_path(output, root_build_dir),
415 ] 404 ]
416 inputs = []
417 } 405 }
418 } 406 }
419 407
420 if (!defined(is_fuchsia) || !is_fuchsia) { 408 if (!defined(is_fuchsia) || !is_fuchsia) {
421 template("generate_patched_sdk") { 409 template("generate_patched_sdk") {
422 assert(defined(invoker.libraries), "Need libraries in $target_name") 410 assert(defined(invoker.libraries), "Need libraries in $target_name")
423 411
424 concatenation_target_names = [] 412 concatenation_target_names = []
425 concatenation_files = [] 413 concatenation_files = []
426 414
427 # Concatenate vm library patches. 415 # Concatenate vm library patches.
428 foreach(library, invoker.libraries) { 416 foreach(library, invoker.libraries) {
429 name = library[1] 417 name = library[0]
430 418
431 target_output = "$target_gen_dir/patches/${name}_patch.dart" 419 target_output = "$target_gen_dir/patches/${name}_patch.dart"
432 concatenate_patch("concatenate_${name}_patch") { 420 concatenate_patch("concatenate_${name}_patch") {
433 libname = name 421 libsources = rebase_path(library[1], ".", library[2])
jamesr 2016/11/11 00:23:24 This fixes the issues seen on bots with the target
zra 2016/11/11 03:23:50 We don't yet do a full Dart SDK build as part of F
434 dir = library[0]
435 output = target_output 422 output = target_output
436 } 423 }
437 concatenation_target_names += [ ":concatenate_${name}_patch" ] 424 concatenation_target_names += [ ":concatenate_${name}_patch" ]
438 concatenation_files += [ target_output ] 425 concatenation_files += [ target_output ]
439 } 426 }
440 427
441 # Build the patched sdk out of the concatenated patches and the special 428 # Build the patched sdk out of the concatenated patches and the special
442 # libraries. 429 # libraries.
443 action(target_name) { 430 action(target_name) {
444 deps = concatenation_target_names 431 deps = concatenation_target_names
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 rebase_path("../../sdk"), 487 rebase_path("../../sdk"),
501 rebase_path(patches_dir, root_build_dir), 488 rebase_path(patches_dir, root_build_dir),
502 rebase_path(patched_sdk_dir, root_build_dir), 489 rebase_path(patched_sdk_dir, root_build_dir),
503 ] 490 ]
504 } 491 }
505 } 492 }
506 493
507 generate_patched_sdk("patched_sdk") { 494 generate_patched_sdk("patched_sdk") {
508 libraries = [ 495 libraries = [
509 [ 496 [
510 "lib",
511 "async", 497 "async",
498 processed_gypis.async_runtime_sources,
499 "../lib",
512 ], 500 ],
513 [ 501 [
514 "lib",
515 "collection", 502 "collection",
503 processed_gypis.collection_runtime_sources,
504 "../lib",
516 ], 505 ],
517 [ 506 [
518 "lib",
519 "convert", 507 "convert",
508 processed_gypis.convert_runtime_sources,
509 "../lib",
520 ], 510 ],
521 [ 511 [
522 "lib",
523 "core", 512 "core",
513 processed_gypis.core_runtime_sources,
514 "../lib",
524 ], 515 ],
525 [ 516 [
526 "lib",
527 "developer", 517 "developer",
518 processed_gypis.developer_runtime_sources,
519 "../lib",
528 ], 520 ],
529 [ 521 [
530 "lib",
531 "internal", 522 "internal",
523 processed_gypis.internal_runtime_sources,
524 "../lib",
532 ], 525 ],
533 [ 526 [
534 "lib",
535 "isolate", 527 "isolate",
528 processed_gypis.isolate_runtime_sources,
529 "../lib",
536 ], 530 ],
537 [ 531 [
538 "lib",
539 "math", 532 "math",
533 processed_gypis.math_runtime_sources,
534 "../lib",
540 ], 535 ],
541 [ 536 [
542 "lib",
543 "mirrors", 537 "mirrors",
538 processed_gypis.mirrors_runtime_sources,
539 "../lib",
544 ], 540 ],
545 [ 541 [
546 "lib",
547 "profiler", 542 "profiler",
543 processed_gypis.profiler_runtime_sources,
544 "../lib",
548 ], 545 ],
549 [ 546 [
550 "lib",
551 "vmservice", 547 "vmservice",
548 processed_gypis.vmservice_runtime_sources,
549 "../lib",
552 ], 550 ],
553 [ 551 [
554 "bin",
555 "io", 552 "io",
553 processed_gypis.bin_io_sources,
554 "../bin",
556 ], 555 ],
557 ] 556 ]
558 } 557 }
559 } 558 }
OLDNEW
« no previous file with comments | « runtime/bin/gypi_contents.gni ('k') | runtime/vm/gypi_contents.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698