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

Commit e2bcf25

Browse files
committed
Change the "develop" runtime mode back to "debug" and rename the "debug" build configuration to "unoptimized"
1 parent 7b3ca93 commit e2bcf25

File tree

1 file changed

+13
-9
lines changed
  • sky/tools

1 file changed

+13
-9
lines changed

sky/tools/gn

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def get_out_dir(args):
2121
if args.simulator:
2222
target_dir.append('sim')
2323

24-
if args.debug:
25-
target_dir.append('debug')
24+
if args.unoptimized:
25+
target_dir.append('unopt')
2626

2727
if args.android_cpu != 'arm':
2828
target_dir.append(args.android_cpu)
@@ -43,19 +43,19 @@ def to_gn_args(args):
4343
if args.target_os == 'android':
4444
raise Exception('--simulator is not supported on Android')
4545
elif args.target_os == 'ios':
46-
if args.runtime_mode != 'develop':
47-
raise Exception('iOS simulator only supports develop mode')
46+
if args.runtime_mode != 'debug':
47+
raise Exception('iOS simulator only supports the debug runtime mode')
4848

4949
gn_args = {}
5050

51-
gn_args['is_debug'] = args.debug
51+
gn_args['is_debug'] = args.unoptimized
5252
gn_args['is_clang'] = args.clang and args.target_os not in ['android']
5353

5454
ios_target_cpu = 'arm64'
5555
if args.ios_force_armv7:
5656
ios_target_cpu = 'arm'
5757

58-
aot = args.runtime_mode != 'develop'
58+
aot = args.runtime_mode != 'debug'
5959
if args.target_os == 'android':
6060
gn_args['target_os'] = 'android'
6161
elif args.target_os == 'ios':
@@ -72,7 +72,11 @@ def to_gn_args(args):
7272
gn_args['use_system_harfbuzz'] = False
7373
aot = False
7474

75-
gn_args['dart_runtime_mode'] = args.runtime_mode
75+
if args.runtime_mode == 'debug':
76+
gn_args['dart_runtime_mode'] = 'develop'
77+
else:
78+
gn_args['dart_runtime_mode'] = args.runtime_mode
79+
7680
if args.target_os == 'android':
7781
gn_args['target_cpu'] = args.android_cpu
7882
elif args.target_os == 'ios':
@@ -120,9 +124,9 @@ def parse_args(args):
120124
args = args[1:]
121125
parser = argparse.ArgumentParser(description='A script run` gn gen`.')
122126

123-
parser.add_argument('--debug', default=False, action='store_true')
127+
parser.add_argument('--unoptimized', default=False, action='store_true')
124128

125-
parser.add_argument('--runtime-mode', type=str, choices=['develop', 'profile', 'release'], default='develop')
129+
parser.add_argument('--runtime-mode', type=str, choices=['debug', 'profile', 'release'], default='debug')
126130

127131
parser.add_argument('--experimental-interpreter', default=False, dest='experimental_interpreter', action='store_true')
128132

0 commit comments

Comments
 (0)