From 3c9223cd8ddbb9c78e6307135c62aa355c66dbaa Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Tue, 10 May 2016 10:57:56 -0700 Subject: [PATCH] Change the "develop" runtime mode back to "debug" and rename the "debug" build configuration to "unoptimized" (#2669) --- sky/tools/gn | 22 +++++++++++++--------- travis/analyze.sh | 4 ++-- travis/build.sh | 4 ++-- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/sky/tools/gn b/sky/tools/gn index e98744807..ac2dc3355 100755 --- a/sky/tools/gn +++ b/sky/tools/gn @@ -21,8 +21,8 @@ def get_out_dir(args): if args.simulator: target_dir.append('sim') - if args.debug: - target_dir.append('debug') + if args.unoptimized: + target_dir.append('unopt') if args.android_cpu != 'arm': target_dir.append(args.android_cpu) @@ -43,19 +43,19 @@ def to_gn_args(args): if args.target_os == 'android': raise Exception('--simulator is not supported on Android') elif args.target_os == 'ios': - if args.runtime_mode != 'develop': - raise Exception('iOS simulator only supports develop mode') + if args.runtime_mode != 'debug': + raise Exception('iOS simulator only supports the debug runtime mode') gn_args = {} - gn_args['is_debug'] = args.debug + gn_args['is_debug'] = args.unoptimized gn_args['is_clang'] = args.clang and args.target_os not in ['android'] ios_target_cpu = 'arm64' if args.ios_force_armv7: ios_target_cpu = 'arm' - aot = args.runtime_mode != 'develop' + aot = args.runtime_mode != 'debug' if args.target_os == 'android': gn_args['target_os'] = 'android' elif args.target_os == 'ios': @@ -72,7 +72,11 @@ def to_gn_args(args): gn_args['use_system_harfbuzz'] = False aot = False - gn_args['dart_runtime_mode'] = args.runtime_mode + if args.runtime_mode == 'debug': + gn_args['dart_runtime_mode'] = 'develop' + else: + gn_args['dart_runtime_mode'] = args.runtime_mode + if args.target_os == 'android': gn_args['target_cpu'] = args.android_cpu elif args.target_os == 'ios': @@ -120,9 +124,9 @@ def parse_args(args): args = args[1:] parser = argparse.ArgumentParser(description='A script run` gn gen`.') - parser.add_argument('--debug', default=False, action='store_true') + parser.add_argument('--unoptimized', default=False, action='store_true') - parser.add_argument('--runtime-mode', type=str, choices=['develop', 'profile', 'release'], default='develop') + parser.add_argument('--runtime-mode', type=str, choices=['debug', 'profile', 'release'], default='debug') parser.add_argument('--experimental-interpreter', default=False, dest='experimental_interpreter', action='store_true') diff --git a/travis/analyze.sh b/travis/analyze.sh index 393a8a44f..41d8b40e6 100755 --- a/travis/analyze.sh +++ b/travis/analyze.sh @@ -10,7 +10,7 @@ RESULTS=`dartanalyzer \ --strong-hints \ --fatal-hints \ --lints \ - out/host_develop_debug/gen/sky/bindings/dart_ui.dart \ + out/host_debug_unopt/gen/sky/bindings/dart_ui.dart \ 2>&1 \ | grep -v "\[error\] Target of URI does not exist: 'dart:mojo.internal'" \ | grep -v "\[error\] Native functions can only be declared in the SDK and code that is loaded through native extensions" \ @@ -23,7 +23,7 @@ RESULTS=`dartanalyzer \ | grep -Ev "Unused import .+dart_ui\.dart" \ | grep -v "\[info\] TODO" \ | grep -Ev "[0-9]+ errors.*found." \ - | grep -v "Analyzing \[out/host_develop_debug/gen/sky/bindings/dart_ui.dart\]\.\.\."` + | grep -v "Analyzing \[out/host_debug_unopt/gen/sky/bindings/dart_ui.dart\]\.\.\."` echo "$RESULTS" if [ -n "$RESULTS" ]; diff --git a/travis/build.sh b/travis/build.sh index 8e21547d2..1ef54e16e 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -3,6 +3,6 @@ set -ex PATH="$HOME/depot_tools:$PATH" -sky/tools/gn --debug -ninja -C out/host_develop_debug generate_dart_ui +sky/tools/gn --unoptimized +ninja -C out/host_debug_unopt generate_dart_ui travis/analyze.sh -- GitLab