Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2017, 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 # This GN file contains build rules for assembling the Dart SDK. There are | 5 # This GN file contains build rules for assembling the Dart SDK. There are |
| 6 # two possible variants: the "Full" SDK, and the "Platform" SDK. If you want | 6 # two possible variants: the "Full" SDK, and the "Platform" SDK. If you want |
| 7 # to make a new subset of the Full SDK, make it the same way we make | 7 # to make a new subset of the Full SDK, make it the same way we make |
| 8 # the Platform SDK. | 8 # the Platform SDK. |
| 9 # | 9 # |
| 10 # Warning: | 10 # Warning: |
| 11 # If you need to copy something into dart-sdk/lib/foo in addition to the stuff | 11 # If you need to copy something into dart-sdk/lib/foo in addition to the stuff |
| 12 # copied there by :copy_libraries, then you must depend on ":copy_libraries", | 12 # copied there by :copy_libraries, then you must depend on ":copy_libraries", |
| 13 # or ":copy_libraries" may delete/overwrite your addition, and the build will | 13 # or ":copy_libraries" may delete/overwrite your addition, and the build will |
| 14 # fail. | 14 # fail. |
| 15 | 15 |
| 16 import("../build/copy_tree.gni") | 16 import("../build/copy_tree.gni") |
| 17 | 17 |
| 18 declare_args() { | 18 declare_args() { |
| 19 # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. | 19 # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. |
| 20 dart_platform_sdk = false | 20 dart_platform_sdk = false |
| 21 } | 21 } |
| 22 | 22 |
| 23 if (is_fuchsia || is_fuchsia_host) { | 23 if (is_fuchsia || |
| 24 is_fuchsia_host || | |
| 25 current_cpu == "arm64" || | |
| 26 current_cpu == "arm") { | |
| 24 dart_platform_sdk = true | 27 dart_platform_sdk = true |
| 25 } | 28 } |
| 26 | 29 |
| 27 # The directory layout of the SDK is as follows: | 30 # The directory layout of the SDK is as follows: |
| 28 # | 31 # |
| 29 # ..dart-sdk/ | 32 # ..dart-sdk/ |
| 30 # ....bin/ | 33 # ....bin/ |
| 31 # ......dart or dart.exe (executable) | 34 # ......dart or dart.exe (executable) |
| 32 # ......dart.lib (import library for VM native extensions on Windows) | 35 # ......dart.lib (import library for VM native extensions on Windows) |
| 33 # ......dartdoc | 36 # ......dartdoc |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 704 deps = [ | 707 deps = [ |
| 705 ":copy_platform_sdk_libraries", | 708 ":copy_platform_sdk_libraries", |
| 706 ":copy_platform_sdk_scripts", | 709 ":copy_platform_sdk_scripts", |
| 707 ":copy_platform_sdk_snapshots", | 710 ":copy_platform_sdk_snapshots", |
| 708 ] | 711 ] |
| 709 } | 712 } |
| 710 | 713 |
| 711 # Parts specific to the full SDK. | 714 # Parts specific to the full SDK. |
| 712 group("create_full_sdk") { | 715 group("create_full_sdk") { |
| 713 visibility = [ | 716 visibility = [ |
| 714 ":copy_dev_compiler_tools", | |
| 715 ":create_sdk", | 717 ":create_sdk", |
| 716 ] | 718 ] |
| 719 | |
| 717 deps = [ | 720 deps = [ |
| 718 ":copy_dev_compiler_sdk", | 721 ":copy_dev_compiler_sdk", |
| 722 ":copy_dev_compiler_tools", | |
|
zra
2017/05/22 20:14:41
I'd rather have this be a dependency of copy_dev_c
Jacob
2017/05/22 20:51:13
That is better. Done.
| |
| 719 ":copy_full_sdk_libraries", | 723 ":copy_full_sdk_libraries", |
| 720 ":copy_full_sdk_scripts", | 724 ":copy_full_sdk_scripts", |
| 721 ":copy_full_sdk_snapshots", | 725 ":copy_full_sdk_snapshots", |
| 722 ] | 726 ] |
| 723 } | 727 } |
| 724 | 728 |
| 725 # The main target to depend on from ../BUILD.gn | 729 # The main target to depend on from ../BUILD.gn |
| 726 group("create_sdk") { | 730 group("create_sdk") { |
| 727 deps = [ | 731 deps = [ |
| 728 ":create_common_sdk", | 732 ":create_common_sdk", |
| 729 ] | 733 ] |
| 730 if (dart_platform_sdk) { | 734 if (dart_platform_sdk) { |
| 731 deps += [ ":create_platform_sdk" ] | 735 deps += [ ":create_platform_sdk" ] |
| 732 } else { | 736 } else { |
| 733 deps += [ ":create_full_sdk" ] | 737 deps += [ ":create_full_sdk" ] |
| 734 } | 738 } |
| 735 } | 739 } |
| 736 | 740 |
| 737 # This rule copies tools to go along with ddc. | 741 # This rule copies tools to go along with ddc. |
| 738 copy("copy_dev_compiler_tools") { | 742 copy("copy_dev_compiler_tools") { |
|
zra
2017/05/22 20:14:41
Then we can move this up above copy_dev_compiler_s
Jacob
2017/05/22 20:51:13
Done.
| |
| 739 deps = [ | 743 deps = [ |
| 740 ":create_full_sdk", | |
| 741 "../utils/dartdevc:dartdevc_web", | 744 "../utils/dartdevc:dartdevc_web", |
| 742 "../utils/dartdevc:stack_trace_mapper", | 745 "../utils/dartdevc:stack_trace_mapper", |
| 743 ] | 746 ] |
| 744 dart_out = get_label_info("../utils/dartdevc:dartdevc_web", "root_out_dir") | 747 dart_out = get_label_info("../utils/dartdevc:dartdevc_web", "root_out_dir") |
| 745 sources = [ | 748 sources = [ |
| 746 "$dart_out/dev_compiler/build/web/dart_stack_trace_mapper.js", | 749 "$dart_out/dev_compiler/build/web/dart_stack_trace_mapper.js", |
| 747 "$dart_out/dev_compiler/build/web/ddc_web_compiler.js", | 750 "$dart_out/dev_compiler/build/web/ddc_web_compiler.js", |
| 748 ] | 751 ] |
| 749 outputs = [ | 752 outputs = [ |
| 750 "$root_out_dir/dart-sdk/lib/dev_compiler/web/{{source_file_part}}", | 753 "$root_out_dir/dart-sdk/lib/dev_compiler/web/{{source_file_part}}", |
| 751 ] | 754 ] |
| 752 } | 755 } |
| OLD | NEW |