OLD | NEW |
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("../../sdk/lib/async/async_sources.gni") |
| 8 import("../../sdk/lib/collection/collection_sources.gni") |
| 9 import("../../sdk/lib/convert/convert_sources.gni") |
| 10 import("../../sdk/lib/core/core_sources.gni") |
| 11 import("../../sdk/lib/developer/developer_sources.gni") |
| 12 import("../../sdk/lib/internal/internal_sources.gni") |
| 13 import("../../sdk/lib/isolate/isolate_sources.gni") |
| 14 import("../../sdk/lib/math/math_sources.gni") |
| 15 import("../../sdk/lib/mirrors/mirrors_sources.gni") |
| 16 import("../../sdk/lib/profiler/profiler_sources.gni") |
| 17 import("../../sdk/lib/typed_data/typed_data_sources.gni") |
| 18 import("../../sdk/lib/vmservice/vmservice_sources.gni") |
7 import("../../utils/generate_patch_sdk.gni") | 19 import("../../utils/generate_patch_sdk.gni") |
8 import("gypi_contents.gni") | 20 import("../bin/io_sources.gni") |
| 21 import("../lib/async_sources.gni") |
| 22 import("../lib/collection_sources.gni") |
| 23 import("../lib/convert_sources.gni") |
| 24 import("../lib/core_sources.gni") |
| 25 import("../lib/developer_sources.gni") |
| 26 import("../lib/internal_sources.gni") |
| 27 import("../lib/isolate_sources.gni") |
| 28 import("../lib/math_sources.gni") |
| 29 import("../lib/mirrors_sources.gni") |
| 30 import("../lib/profiler_sources.gni") |
| 31 import("../lib/typed_data_sources.gni") |
| 32 import("../lib/vmservice_sources.gni") |
9 import("../runtime_args.gni") | 33 import("../runtime_args.gni") |
| 34 import("vm_sources.gni") |
10 | 35 |
11 config("libdart_vm_config") { | 36 config("libdart_vm_config") { |
12 if (is_fuchsia) { | 37 if (is_fuchsia) { |
13 libs = [ "magenta" ] | 38 libs = [ "magenta" ] |
14 } else if (is_win) { | 39 } else if (is_win) { |
15 libs = [ | 40 libs = [ |
16 "advapi32.lib", | 41 "advapi32.lib", |
17 "shell32.lib", | 42 "shell32.lib", |
18 "dbghelp.lib", | 43 "dbghelp.lib", |
19 ] | 44 ] |
20 } else { | 45 } else { |
21 libs = [ "dl" ] | 46 libs = [ "dl" ] |
22 if (!is_android) { | 47 if (!is_android) { |
23 libs += [ "pthread" ] | 48 libs += [ "pthread" ] |
24 } | 49 } |
25 if (is_linux) { | 50 if (is_linux) { |
26 libs += [ "rt" ] | 51 libs += [ "rt" ] |
27 } | 52 } |
28 } | 53 } |
29 } | 54 } |
30 | 55 |
31 template("build_libdart_platform") { | |
32 extra_configs = [] | |
33 if (defined(invoker.extra_configs)) { | |
34 extra_configs += invoker.extra_configs | |
35 } | |
36 static_library(target_name) { | |
37 configs += [ "..:dart_config" ] + extra_configs | |
38 if (is_fuchsia) { | |
39 configs -= [ "//build/config:symbol_visibility_hidden" ] | |
40 deps = [ | |
41 "//apps/tracing/lib/trace", | |
42 ] | |
43 } | |
44 public_configs = [ ":libdart_vm_config" ] | |
45 | |
46 sources = rebase_path(processed_gypis.platform_sources, ".", "../platform") | |
47 | |
48 include_dirs = [ ".." ] | |
49 } | |
50 } | |
51 | |
52 build_libdart_platform("libdart_platform") { | |
53 extra_configs = [ "..:dart_maybe_product_config" ] | |
54 } | |
55 | |
56 build_libdart_platform("libdart_platform_product") { | |
57 extra_configs = [ "..:dart_product_config" ] | |
58 } | |
59 | |
60 vm_sources_list = processed_gypis.vm_sources | |
61 | |
62 template("build_libdart_vm") { | 56 template("build_libdart_vm") { |
63 extra_configs = [] | 57 extra_configs = [] |
64 if (defined(invoker.extra_configs)) { | 58 if (defined(invoker.extra_configs)) { |
65 extra_configs += invoker.extra_configs | 59 extra_configs += invoker.extra_configs |
66 } | 60 } |
67 source_set(target_name) { | 61 source_set(target_name) { |
68 configs += [ "..:dart_config" ] + extra_configs | 62 configs += [ "..:dart_config" ] + extra_configs |
69 if (is_fuchsia) { | 63 if (is_fuchsia) { |
70 configs -= [ "//build/config:symbol_visibility_hidden" ] | 64 configs -= [ "//build/config:symbol_visibility_hidden" ] |
71 deps = [ | 65 deps = [ |
72 "//apps/tracing/lib/trace", | 66 "//apps/tracing/lib/trace", |
73 ] | 67 ] |
74 } | 68 } |
75 public_configs = [ ":libdart_vm_config" ] | 69 public_configs = [ ":libdart_vm_config" ] |
76 set_sources_assignment_filter([ | 70 set_sources_assignment_filter([ |
77 "*_test.cc", | 71 "*_test.cc", |
78 "*_test.h", | 72 "*_test.h", |
79 ]) | 73 ]) |
80 sources = vm_sources_list | 74 sources = vm_sources |
81 include_dirs = [ ".." ] | 75 include_dirs = [ ".." ] |
82 } | 76 } |
83 } | 77 } |
84 | 78 |
85 build_libdart_vm("libdart_vm_jit") { | 79 build_libdart_vm("libdart_vm_jit") { |
86 extra_configs = [ "..:dart_maybe_product_config" ] | 80 extra_configs = [ "..:dart_maybe_product_config" ] |
87 } | 81 } |
88 | 82 |
89 build_libdart_vm("libdart_vm_jit_product") { | 83 build_libdart_vm("libdart_vm_jit_product") { |
90 extra_configs = [ "..:dart_product_config" ] | 84 extra_configs = [ "..:dart_product_config" ] |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 "..:dart_precompiled_runtime_config", | 314 "..:dart_precompiled_runtime_config", |
321 ] | 315 ] |
322 extra_sources = all_libsources + [ "bootstrap_nocore.cc" ] | 316 extra_sources = all_libsources + [ "bootstrap_nocore.cc" ] |
323 } | 317 } |
324 } | 318 } |
325 | 319 |
326 generate_core_libraries("core_libraries") { | 320 generate_core_libraries("core_libraries") { |
327 sources = [ | 321 sources = [ |
328 [ | 322 [ |
329 "async", | 323 "async", |
330 processed_gypis.async_sdk_sources, | 324 async_sdk_sources, |
331 "../../sdk/lib/async", | 325 "../../sdk/lib/async", |
332 "async", | 326 "async", |
333 true, | 327 true, |
334 processed_gypis.async_runtime_sources, | 328 async_runtime_sources, |
| 329 "../lib", |
| 330 ], |
| 331 [ |
| 332 "collection", |
| 333 collection_sdk_sources, |
| 334 "../../sdk/lib/collection", |
| 335 "collection", |
| 336 true, |
| 337 collection_runtime_sources, |
| 338 "../lib", |
| 339 ], |
| 340 [ |
| 341 "convert", |
| 342 convert_sdk_sources, |
| 343 "../../sdk/lib/convert", |
| 344 "convert", |
| 345 true, |
| 346 convert_runtime_sources, |
335 "../lib", | 347 "../lib", |
336 ], | 348 ], |
337 [ | 349 [ |
338 "core", | 350 "core", |
339 processed_gypis.core_sdk_sources, | 351 core_sdk_sources, |
340 "../../sdk/lib/core", | 352 "../../sdk/lib/core", |
341 "core", | 353 "core", |
342 true, | 354 true, |
343 processed_gypis.core_runtime_sources, | 355 core_runtime_sources, |
344 "../lib", | |
345 ], | |
346 [ | |
347 "collection", | |
348 processed_gypis.collection_sdk_sources, | |
349 "../../sdk/lib/collection", | |
350 "collection", | |
351 true, | |
352 processed_gypis.collection_runtime_sources, | |
353 "../lib", | |
354 ], | |
355 [ | |
356 "convert", | |
357 processed_gypis.convert_sdk_sources, | |
358 "../../sdk/lib/convert", | |
359 "convert", | |
360 true, | |
361 processed_gypis.convert_runtime_sources, | |
362 "../lib", | 356 "../lib", |
363 ], | 357 ], |
364 [ | 358 [ |
365 "developer", | 359 "developer", |
366 processed_gypis.developer_sdk_sources, | 360 developer_sdk_sources, |
367 "../../sdk/lib/developer", | 361 "../../sdk/lib/developer", |
368 "developer", | 362 "developer", |
369 true, | 363 true, |
370 processed_gypis.developer_runtime_sources, | 364 developer_runtime_sources, |
371 "../lib", | 365 "../lib", |
372 ], | 366 ], |
373 [ | 367 [ |
374 "_internal", | 368 "_internal", |
375 processed_gypis.internal_sdk_sources, | 369 internal_sdk_sources, |
376 "../../sdk/lib/internal", | 370 "../../sdk/lib/internal", |
377 "internal", | 371 "internal", |
378 true, | 372 true, |
379 processed_gypis.internal_runtime_sources, | 373 internal_runtime_sources, |
380 "../lib", | 374 "../lib", |
381 ], | 375 ], |
382 [ | 376 [ |
383 "isolate", | 377 "isolate", |
384 processed_gypis.isolate_sdk_sources, | 378 isolate_sdk_sources, |
385 "../../sdk/lib/isolate", | 379 "../../sdk/lib/isolate", |
386 "isolate", | 380 "isolate", |
387 true, | 381 true, |
388 processed_gypis.isolate_runtime_sources, | 382 isolate_runtime_sources, |
389 "../lib", | 383 "../lib", |
390 ], | 384 ], |
391 [ | 385 [ |
392 "math", | 386 "math", |
393 processed_gypis.math_sdk_sources, | 387 math_sdk_sources, |
394 "../../sdk/lib/math", | 388 "../../sdk/lib/math", |
395 "math", | 389 "math", |
396 true, | 390 true, |
397 processed_gypis.math_runtime_sources, | 391 math_runtime_sources, |
398 "../lib", | 392 "../lib", |
399 ], | 393 ], |
400 [ | 394 [ |
401 "mirrors", | 395 "mirrors", |
402 processed_gypis.mirrors_sdk_sources, | 396 mirrors_sdk_sources, |
403 "../../sdk/lib/mirrors", | 397 "../../sdk/lib/mirrors", |
404 "mirrors", | 398 "mirrors", |
405 true, | 399 true, |
406 processed_gypis.mirrors_runtime_sources, | 400 mirrors_runtime_sources, |
407 "../lib", | 401 "../lib", |
408 ], | 402 ], |
409 [ | 403 [ |
410 "profiler", | 404 "profiler", |
411 processed_gypis.profiler_sdk_sources, | 405 profiler_sdk_sources, |
412 "../../sdk/lib/profiler", | 406 "../../sdk/lib/profiler", |
413 "profiler", | 407 "profiler", |
414 false, | 408 false, |
415 ], | 409 ], |
416 [ | 410 [ |
417 "typed_data", | 411 "typed_data", |
418 processed_gypis.typed_data_sdk_sources, | 412 typed_data_sdk_sources, |
419 "../../sdk/lib/typed_data", | 413 "../../sdk/lib/typed_data", |
420 "typed_data", | 414 "typed_data", |
421 true, | 415 true, |
422 processed_gypis.typed_data_runtime_sources, | 416 typed_data_runtime_sources, |
423 "../lib", | 417 "../lib", |
424 ], | 418 ], |
425 [ | 419 [ |
426 "_vmservice", | 420 "_vmservice", |
427 processed_gypis.vmservice_sdk_sources, | 421 vmservice_sdk_sources, |
428 "../../sdk/lib/vmservice", | 422 "../../sdk/lib/vmservice", |
429 "vmservice", | 423 "vmservice", |
430 true, | 424 true, |
431 processed_gypis.vmservice_runtime_sources, | 425 vmservice_runtime_sources, |
432 "../lib", | 426 "../lib", |
433 ], | 427 ], |
434 ] | 428 ] |
435 allsources = processed_gypis.allsources | 429 allsources = async_runtime_sources + collection_runtime_sources + |
| 430 convert_runtime_sources + core_runtime_sources + |
| 431 developer_runtime_sources + internal_runtime_sources + |
| 432 isolate_runtime_sources + math_runtime_sources + |
| 433 mirrors_runtime_sources + profiler_runtime_sources + |
| 434 typed_data_runtime_sources + vmservice_runtime_sources |
436 } | 435 } |
437 | 436 |
438 template("concatenate_patch") { | 437 template("concatenate_patch") { |
439 assert(defined(invoker.libsources), "Need a sources in $target_name") | 438 assert(defined(invoker.libsources), "Need a sources in $target_name") |
440 assert(defined(invoker.output), "Need an output in $target_name") | 439 assert(defined(invoker.output), "Need an output in $target_name") |
441 | 440 |
442 process_library_source(target_name) { | 441 process_library_source(target_name) { |
443 libsources = invoker.libsources | 442 libsources = invoker.libsources |
444 inputs = [] | 443 inputs = [] |
445 output = invoker.output | 444 output = invoker.output |
(...skipping 29 matching lines...) Expand all Loading... |
475 deps = concatenation_target_names | 474 deps = concatenation_target_names |
476 input_patches_dir = "$target_gen_dir/patches" | 475 input_patches_dir = "$target_gen_dir/patches" |
477 patched_sdk_dir = "patched_sdk" | 476 patched_sdk_dir = "patched_sdk" |
478 } | 477 } |
479 } | 478 } |
480 | 479 |
481 generate_vm_patched_sdk("patched_sdk") { | 480 generate_vm_patched_sdk("patched_sdk") { |
482 libraries = [ | 481 libraries = [ |
483 [ | 482 [ |
484 "async", | 483 "async", |
485 processed_gypis.async_runtime_sources, | 484 async_runtime_sources, |
486 "../lib", | 485 "../lib", |
487 ], | 486 ], |
488 [ | 487 [ |
489 "collection", | 488 "collection", |
490 processed_gypis.collection_runtime_sources, | 489 collection_runtime_sources, |
491 "../lib", | 490 "../lib", |
492 ], | 491 ], |
493 [ | 492 [ |
494 "convert", | 493 "convert", |
495 processed_gypis.convert_runtime_sources, | 494 convert_runtime_sources, |
496 "../lib", | 495 "../lib", |
497 ], | 496 ], |
498 [ | 497 [ |
499 "core", | 498 "core", |
500 processed_gypis.core_runtime_sources, | 499 core_runtime_sources, |
501 "../lib", | 500 "../lib", |
502 ], | 501 ], |
503 [ | 502 [ |
504 "developer", | 503 "developer", |
505 processed_gypis.developer_runtime_sources, | 504 developer_runtime_sources, |
506 "../lib", | 505 "../lib", |
507 ], | 506 ], |
508 [ | 507 [ |
509 "internal", | 508 "internal", |
510 processed_gypis.internal_runtime_sources, | 509 internal_runtime_sources, |
511 "../lib", | 510 "../lib", |
512 ], | 511 ], |
513 [ | 512 [ |
514 "isolate", | 513 "isolate", |
515 processed_gypis.isolate_runtime_sources, | 514 isolate_runtime_sources, |
516 "../lib", | 515 "../lib", |
517 ], | 516 ], |
518 [ | 517 [ |
519 "math", | 518 "math", |
520 processed_gypis.math_runtime_sources, | 519 math_runtime_sources, |
521 "../lib", | 520 "../lib", |
522 ], | 521 ], |
523 [ | 522 [ |
524 "mirrors", | 523 "mirrors", |
525 processed_gypis.mirrors_runtime_sources, | 524 mirrors_runtime_sources, |
526 "../lib", | 525 "../lib", |
527 ], | 526 ], |
528 [ | 527 [ |
529 "profiler", | 528 "profiler", |
530 processed_gypis.profiler_runtime_sources, | 529 profiler_runtime_sources, |
531 "../lib", | 530 "../lib", |
532 ], | 531 ], |
533 [ | 532 [ |
534 "typed_data", | 533 "typed_data", |
535 processed_gypis.typed_data_runtime_sources, | 534 typed_data_runtime_sources, |
536 "../lib", | 535 "../lib", |
537 ], | 536 ], |
538 [ | 537 [ |
539 "vmservice", | 538 "vmservice", |
540 processed_gypis.vmservice_runtime_sources, | 539 vmservice_runtime_sources, |
541 "../lib", | 540 "../lib", |
542 ], | 541 ], |
543 [ | 542 [ |
544 "io", | 543 "io", |
545 processed_gypis.bin_io_sources, | 544 io_runtime_sources, |
546 "../bin", | 545 "../bin", |
547 ], | 546 ], |
548 ] | 547 ] |
549 } | 548 } |
OLD | NEW |