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