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 import("../build/flutter_args.gni") | |
| 17 | 18 |
| 18 declare_args() { | 19 declare_args() { |
| 19 # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. | 20 # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. |
| 20 dart_platform_sdk = false | 21 dart_platform_sdk = false |
|
zra
2017/08/07 22:11:14
Sorry for not noticing this sooner: Since both Flu
aam
2017/08/07 23:19:07
tools/gn.py pulls the value for this flag from env
| |
| 21 } | 22 } |
| 22 | 23 |
| 23 if (is_fuchsia || | 24 if (is_fuchsia || |
| 24 is_fuchsia_host || | 25 is_fuchsia_host || |
| 26 is_flutter || | |
| 25 current_cpu == "arm64" || | 27 current_cpu == "arm64" || |
| 26 current_cpu == "arm") { | 28 current_cpu == "arm") { |
| 27 dart_platform_sdk = true | 29 dart_platform_sdk = true |
| 28 } | 30 } |
| 29 | 31 |
| 30 # The directory layout of the SDK is as follows: | 32 # The directory layout of the SDK is as follows: |
| 31 # | 33 # |
| 32 # ..dart-sdk/ | 34 # ..dart-sdk/ |
| 33 # ....bin/ | 35 # ....bin/ |
| 34 # ......dart or dart.exe (executable) | 36 # ......dart or dart.exe (executable) |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 copy("copy_dart") { | 221 copy("copy_dart") { |
| 220 visibility = [ ":create_common_sdk" ] | 222 visibility = [ ":create_common_sdk" ] |
| 221 deps = [ | 223 deps = [ |
| 222 "../runtime/bin:dart", | 224 "../runtime/bin:dart", |
| 223 ] | 225 ] |
| 224 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") | 226 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") |
| 225 if (is_win) { | 227 if (is_win) { |
| 226 sources = [ | 228 sources = [ |
| 227 "$dart_out/dart.exe", | 229 "$dart_out/dart.exe", |
| 228 ] | 230 ] |
| 229 } else if (is_fuchsia || is_fuchsia_host) { | 231 } else if (is_fuchsia || is_fuchsia_host || is_flutter) { |
|
zra
2017/08/07 22:11:13
As with the platform_sdk flag, we should change th
| |
| 230 sources = [ | 232 sources = [ |
| 231 "$dart_out/dart", | 233 "$dart_out/dart", |
| 232 ] | 234 ] |
| 233 } else { | 235 } else { |
| 234 sources = [ | 236 sources = [ |
| 235 "$dart_out/exe.stripped/dart", | 237 "$dart_out/exe.stripped/dart", |
| 236 ] | 238 ] |
| 237 } | 239 } |
| 238 if (is_win) { | 240 if (is_win) { |
| 239 sources += [ "$dart_out/dart.lib" ] | 241 sources += [ "$dart_out/dart.lib" ] |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 783 group("create_sdk") { | 785 group("create_sdk") { |
| 784 deps = [ | 786 deps = [ |
| 785 ":create_common_sdk", | 787 ":create_common_sdk", |
| 786 ] | 788 ] |
| 787 if (dart_platform_sdk) { | 789 if (dart_platform_sdk) { |
| 788 deps += [ ":create_platform_sdk" ] | 790 deps += [ ":create_platform_sdk" ] |
| 789 } else { | 791 } else { |
| 790 deps += [ ":create_full_sdk" ] | 792 deps += [ ":create_full_sdk" ] |
| 791 } | 793 } |
| 792 } | 794 } |
| OLD | NEW |