| 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 # Path to stripped dart binary relative to build output directory. |
| 22 dart_stripped_binary = "dart" |
| 28 } | 23 } |
| 29 | 24 |
| 30 # The directory layout of the SDK is as follows: | 25 # The directory layout of the SDK is as follows: |
| 31 # | 26 # |
| 32 # ..dart-sdk/ | 27 # ..dart-sdk/ |
| 33 # ....bin/ | 28 # ....bin/ |
| 34 # ......dart or dart.exe (executable) | 29 # ......dart or dart.exe (executable) |
| 35 # ......dart.lib (import library for VM native extensions on Windows) | 30 # ......dart.lib (import library for VM native extensions on Windows) |
| 36 # ......dartdoc | 31 # ......dartdoc |
| 37 # ......dartfmt | 32 # ......dartfmt |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 copy("copy_dart") { | 214 copy("copy_dart") { |
| 220 visibility = [ ":create_common_sdk" ] | 215 visibility = [ ":create_common_sdk" ] |
| 221 deps = [ | 216 deps = [ |
| 222 "../runtime/bin:dart", | 217 "../runtime/bin:dart", |
| 223 ] | 218 ] |
| 224 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") | 219 dart_out = get_label_info("../runtime/bin:dart", "root_out_dir") |
| 225 if (is_win) { | 220 if (is_win) { |
| 226 sources = [ | 221 sources = [ |
| 227 "$dart_out/dart.exe", | 222 "$dart_out/dart.exe", |
| 228 ] | 223 ] |
| 229 } else if (is_fuchsia || is_fuchsia_host) { | |
| 230 sources = [ | |
| 231 "$dart_out/dart", | |
| 232 ] | |
| 233 } else { | 224 } else { |
| 234 sources = [ | 225 sources = [ |
| 235 "$dart_out/exe.stripped/dart", | 226 "$dart_out/$dart_stripped_binary" |
| 236 ] | 227 ] |
| 237 } | 228 } |
| 238 if (is_win) { | 229 if (is_win) { |
| 239 sources += [ "$dart_out/dart.lib" ] | 230 sources += [ "$dart_out/dart.lib" ] |
| 240 } | 231 } |
| 241 outputs = [ | 232 outputs = [ |
| 242 "$root_out_dir/dart-sdk/bin/{{source_file_part}}", | 233 "$root_out_dir/dart-sdk/bin/{{source_file_part}}", |
| 243 ] | 234 ] |
| 244 } | 235 } |
| 245 | 236 |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 group("create_sdk") { | 774 group("create_sdk") { |
| 784 deps = [ | 775 deps = [ |
| 785 ":create_common_sdk", | 776 ":create_common_sdk", |
| 786 ] | 777 ] |
| 787 if (dart_platform_sdk) { | 778 if (dart_platform_sdk) { |
| 788 deps += [ ":create_platform_sdk" ] | 779 deps += [ ":create_platform_sdk" ] |
| 789 } else { | 780 } else { |
| 790 deps += [ ":create_full_sdk" ] | 781 deps += [ ":create_full_sdk" ] |
| 791 } | 782 } |
| 792 } | 783 } |
| OLD | NEW |