From 1d50f112dcbf57aeb69739b855e5df93cfed168f Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Tue, 8 Aug 2017 14:42:07 -0700 Subject: [PATCH] Flutter and Fuchsia build stripped down [platform] version of dart sdk, so make it default(while standalone builds full dart sdk) Both Flutter and Fuchsia expect stripped dart in standard out directory, so make that default too(while standalone build puts stripped into exe.stripped/). BUG= R=zra@google.com Review-Url: https://codereview.chromium.org/2998503002 . --- sdk/BUILD.gn | 15 +++------------ tools/gn.py | 4 +++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index f0458053bb4..6ec91aeaba7 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -17,14 +17,9 @@ import("../build/copy_tree.gni") declare_args() { # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries. - dart_platform_sdk = false -} - -if (is_fuchsia || - is_fuchsia_host || - current_cpu == "arm64" || - current_cpu == "arm") { dart_platform_sdk = true + # Path to stripped dart binary relative to build output directory. + dart_stripped_binary = "dart" } # The directory layout of the SDK is as follows: @@ -226,13 +221,9 @@ copy("copy_dart") { sources = [ "$dart_out/dart.exe", ] - } else if (is_fuchsia || is_fuchsia_host) { - sources = [ - "$dart_out/dart", - ] } else { sources = [ - "$dart_out/exe.stripped/dart", + "$dart_out/$dart_stripped_binary" ] } if (is_win) { diff --git a/tools/gn.py b/tools/gn.py index 91defcdcbbb..fe22ba46650 100755 --- a/tools/gn.py +++ b/tools/gn.py @@ -223,7 +223,9 @@ def ToGnArgs(args, mode, arch, target_os): gn_args['is_msan'] = args.msan and gn_args['is_clang'] gn_args['is_tsan'] = args.tsan and gn_args['is_clang'] - gn_args['dart_platform_sdk'] = args.platform_sdk + if not args.platform_sdk and not gn_args['target_cpu'].startswith('arm'): + gn_args['dart_platform_sdk'] = args.platform_sdk + gn_args['dart_stripped_binary'] = 'exe.stripped/dart' # Setup the user-defined sysroot. if gn_args['target_os'] == 'linux' and args.wheezy and not crossbuild: