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 || | 23 if (is_fuchsia || |
24 is_fuchsia_host || | 24 is_fuchsia_host || |
| 25 is_flutter || |
25 current_cpu == "arm64" || | 26 current_cpu == "arm64" || |
26 current_cpu == "arm") { | 27 current_cpu == "arm") { |
27 dart_platform_sdk = true | 28 dart_platform_sdk = true |
28 } | 29 } |
29 | 30 |
30 # The directory layout of the SDK is as follows: | 31 # The directory layout of the SDK is as follows: |
31 # | 32 # |
32 # ..dart-sdk/ | 33 # ..dart-sdk/ |
33 # ....bin/ | 34 # ....bin/ |
34 # ......dart or dart.exe (executable) | 35 # ......dart or dart.exe (executable) |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 copy("copy_dart") { | 220 copy("copy_dart") { |
220 visibility = [ ":create_common_sdk" ] | 221 visibility = [ ":create_common_sdk" ] |
221 deps = [ | 222 deps = [ |
222 "../runtime/bin:dart", | 223 "../runtime/bin:dart", |
223 ] | 224 ] |
224 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") | 225 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") |
225 if (is_win) { | 226 if (is_win) { |
226 sources = [ | 227 sources = [ |
227 "$dart_out/dart.exe", | 228 "$dart_out/dart.exe", |
228 ] | 229 ] |
229 } else if (is_fuchsia || is_fuchsia_host) { | 230 } else if (is_fuchsia || is_fuchsia_host || is_flutter) { |
230 sources = [ | 231 sources = [ |
231 "$dart_out/dart", | 232 "$dart_out/dart", |
232 ] | 233 ] |
233 } else { | 234 } else { |
234 sources = [ | 235 sources = [ |
235 "$dart_out/exe.stripped/dart", | 236 "$dart_out/exe.stripped/dart", |
236 ] | 237 ] |
237 } | 238 } |
238 if (is_win) { | 239 if (is_win) { |
239 sources += [ "$dart_out/dart.lib" ] | 240 sources += [ "$dart_out/dart.lib" ] |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 group("create_sdk") { | 784 group("create_sdk") { |
784 deps = [ | 785 deps = [ |
785 ":create_common_sdk", | 786 ":create_common_sdk", |
786 ] | 787 ] |
787 if (dart_platform_sdk) { | 788 if (dart_platform_sdk) { |
788 deps += [ ":create_platform_sdk" ] | 789 deps += [ ":create_platform_sdk" ] |
789 } else { | 790 } else { |
790 deps += [ ":create_full_sdk" ] | 791 deps += [ ":create_full_sdk" ] |
791 } | 792 } |
792 } | 793 } |
OLD | NEW |