Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Change the "develop" runtime mode back to "debug" and rename the "deb… #2669

Merged
merged 1 commit into from
May 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions sky/tools/gn
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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':
Expand All @@ -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':
Expand Down Expand Up @@ -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')

Expand Down
4 changes: 2 additions & 2 deletions travis/analyze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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" ];
Expand Down
4 changes: 2 additions & 2 deletions travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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