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 | |
| 21 } | |
| 22 | |
| 23 if (is_fuchsia || | |
| 24 is_fuchsia_host || | |
| 25 current_cpu == "arm64" || | |
| 26 current_cpu == "arm") { | |
| 27 dart_platform_sdk = true | 20 dart_platform_sdk = true |
| 21 dart_stripped_binary = "dart" | |
|
zra
2017/08/08 21:10:24
Please add a comment.
aam
2017/08/08 21:18:24
Done.
| |
| 28 } | 22 } |
| 29 | 23 |
| 30 # The directory layout of the SDK is as follows: | 24 # The directory layout of the SDK is as follows: |
| 31 # | 25 # |
| 32 # ..dart-sdk/ | 26 # ..dart-sdk/ |
| 33 # ....bin/ | 27 # ....bin/ |
| 34 # ......dart or dart.exe (executable) | 28 # ......dart or dart.exe (executable) |
| 35 # ......dart.lib (import library for VM native extensions on Windows) | 29 # ......dart.lib (import library for VM native extensions on Windows) |
| 36 # ......dartdoc | 30 # ......dartdoc |
| 37 # ......dartfmt | 31 # ......dartfmt |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 217 | 211 |
| 218 # Copies the Dart VM binary into bin/ | 212 # Copies the Dart VM binary into bin/ |
| 219 copy("copy_dart") { | 213 copy("copy_dart") { |
| 220 visibility = [ ":create_common_sdk" ] | 214 visibility = [ ":create_common_sdk" ] |
| 221 deps = [ | 215 deps = [ |
| 222 "../runtime/bin:dart", | 216 "../runtime/bin:dart", |
| 223 ] | 217 ] |
| 224 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") | 218 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") |
| 225 if (is_win) { | 219 if (is_win) { |
| 226 sources = [ | 220 sources = [ |
| 227 "$dart_out/dart.exe", | 221 "$dart_out/dart.exe", |
|
zra
2017/08/08 21:10:24
May need to check in with bkonyi to see if this is
aam
2017/08/08 21:18:24
Do you mean in Flutter engine build on Windows onc
zra
2017/08/08 21:42:42
Yes
| |
| 228 ] | 222 ] |
| 229 } else if (is_fuchsia || is_fuchsia_host) { | |
| 230 sources = [ | |
| 231 "$dart_out/dart", | |
| 232 ] | |
| 233 } else { | 223 } else { |
| 234 sources = [ | 224 sources = [ |
| 235 "$dart_out/exe.stripped/dart", | 225 "$dart_out/$dart_stripped_binary" |
| 236 ] | 226 ] |
| 237 } | 227 } |
| 238 if (is_win) { | 228 if (is_win) { |
| 239 sources += [ "$dart_out/dart.lib" ] | 229 sources += [ "$dart_out/dart.lib" ] |
| 240 } | 230 } |
| 241 outputs = [ | 231 outputs = [ |
| 242 "$root_out_dir/dart-sdk/bin/{{source_file_part}}", | 232 "$root_out_dir/dart-sdk/bin/{{source_file_part}}", |
| 243 ] | 233 ] |
| 244 } | 234 } |
| 245 | 235 |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 783 group("create_sdk") { | 773 group("create_sdk") { |
| 784 deps = [ | 774 deps = [ |
| 785 ":create_common_sdk", | 775 ":create_common_sdk", |
| 786 ] | 776 ] |
| 787 if (dart_platform_sdk) { | 777 if (dart_platform_sdk) { |
| 788 deps += [ ":create_platform_sdk" ] | 778 deps += [ ":create_platform_sdk" ] |
| 789 } else { | 779 } else { |
| 790 deps += [ ":create_full_sdk" ] | 780 deps += [ ":create_full_sdk" ] |
| 791 } | 781 } |
| 792 } | 782 } |
| OLD | NEW |