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 config("libdart_vm_config") { | 5 config("libdart_vm_config") { |
6 if (defined(is_fuchsia) && is_fuchsia) { | 6 if (defined(is_fuchsia) && is_fuchsia) { |
7 libs = [ "magenta" ] | 7 libs = [ "magenta" ] |
8 } else if (is_win) { | 8 } else if (is_win) { |
9 libs = [ | 9 libs = [ |
10 "advapi32.lib", | 10 "advapi32.lib", |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
431 dir = library[0] | 431 dir = library[0] |
432 output = target_output | 432 output = target_output |
433 } | 433 } |
434 concatenation_target_names += [ ":concatenate_${name}_patch" ] | 434 concatenation_target_names += [ ":concatenate_${name}_patch" ] |
435 concatenation_files += [ target_output ] | 435 concatenation_files += [ target_output ] |
436 } | 436 } |
437 | 437 |
438 # Build the patched sdk out of the concatenated patches and the special | 438 # Build the patched sdk out of the concatenated patches and the special |
439 # libraries. | 439 # libraries. |
440 action(target_name) { | 440 action(target_name) { |
441 deps = concatenation_target_names | 441 deps = [ "../bin:dart_bootstrap($host_toolchain)" ] + |
442 concatenation_target_names | |
442 | 443 |
443 patches_dir = "$target_gen_dir/patches" | 444 patches_dir = "$target_gen_dir/patches" |
444 patched_sdk_dir = "$root_out_dir/patched_sdk" | 445 patched_sdk_dir = "$root_out_dir/patched_sdk" |
445 | 446 |
446 script = "../../tools/patch_sdk.py" | 447 script = "../../tools/patch_sdk.py" |
447 | 448 |
448 # We list all files which make up the sdk (modulo patches) and get them ba ck | 449 # We list all files which make up the sdk (modulo patches) and get them ba ck |
449 # as a GN list object. | 450 # as a GN list object. |
450 shared_sdk_sources = exec_script("../../tools/list_dart_files.py", | 451 shared_sdk_sources = exec_script("../../tools/list_dart_files.py", |
451 [ "../../sdk/lib" ], | 452 [ "../../sdk/lib" ], |
(...skipping 19 matching lines...) Expand all Loading... | |
471 inputs += shared_sdk_sources | 472 inputs += shared_sdk_sources |
472 | 473 |
473 # Add all the concatenated patch files. | 474 # Add all the concatenated patch files. |
474 inputs += concatenation_files | 475 inputs += concatenation_files |
475 | 476 |
476 outputs = [ | 477 outputs = [ |
477 # Instead of listing all outputs we list a single well-known one. | 478 # Instead of listing all outputs we list a single well-known one. |
478 "${patched_sdk_dir}/lib/core/core.dart", | 479 "${patched_sdk_dir}/lib/core/core.dart", |
479 ] | 480 ] |
480 | 481 |
482 dart_out_dir = get_label_info("../bin:dart_bootstrap($host_toolchain)", | |
483 "root_out_dir") | |
484 if (is_win) { | |
485 dart_bootstrap = rebase_path("$dart_out_dir/dart_bootstrap.exe") | |
Cutch
2016/11/01 19:33:52
This `if (is_win) { } else { }` pattern is repeate
zra
2016/11/01 19:59:28
Added to invoke_dart.gni
| |
486 } else { | |
487 dart_bootstrap = rebase_path("$dart_out_dir/dart_bootstrap") | |
488 } | |
489 | |
481 args = [ | 490 args = [ |
491 "--dart-executable", | |
492 dart_bootstrap, | |
482 "vm", | 493 "vm", |
483 rebase_path("../../sdk"), | 494 rebase_path("../../sdk"), |
484 rebase_path(patches_dir, root_build_dir), | 495 rebase_path(patches_dir, root_build_dir), |
485 rebase_path(patched_sdk_dir, root_build_dir), | 496 rebase_path(patched_sdk_dir, root_build_dir), |
486 ] | 497 ] |
487 } | 498 } |
488 } | 499 } |
489 | 500 |
490 generate_patched_sdk("patched_sdk") { | 501 generate_patched_sdk("patched_sdk") { |
491 libraries = [ | 502 libraries = [ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
533 "lib", | 544 "lib", |
534 "vmservice", | 545 "vmservice", |
535 ], | 546 ], |
536 [ | 547 [ |
537 "bin", | 548 "bin", |
538 "io", | 549 "io", |
539 ], | 550 ], |
540 ] | 551 ] |
541 } | 552 } |
542 } | 553 } |
OLD | NEW |