@@ -21,8 +21,8 @@ def get_out_dir(args):
21
21
if args .simulator :
22
22
target_dir .append ('sim' )
23
23
24
- if args .debug :
25
- target_dir .append ('debug ' )
24
+ if args .unoptimized :
25
+ target_dir .append ('unopt ' )
26
26
27
27
if args .android_cpu != 'arm' :
28
28
target_dir .append (args .android_cpu )
@@ -43,19 +43,19 @@ def to_gn_args(args):
43
43
if args .target_os == 'android' :
44
44
raise Exception ('--simulator is not supported on Android' )
45
45
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' )
48
48
49
49
gn_args = {}
50
50
51
- gn_args ['is_debug' ] = args .debug
51
+ gn_args ['is_debug' ] = args .unoptimized
52
52
gn_args ['is_clang' ] = args .clang and args .target_os not in ['android' ]
53
53
54
54
ios_target_cpu = 'arm64'
55
55
if args .ios_force_armv7 :
56
56
ios_target_cpu = 'arm'
57
57
58
- aot = args .runtime_mode != 'develop '
58
+ aot = args .runtime_mode != 'debug '
59
59
if args .target_os == 'android' :
60
60
gn_args ['target_os' ] = 'android'
61
61
elif args .target_os == 'ios' :
@@ -72,7 +72,11 @@ def to_gn_args(args):
72
72
gn_args ['use_system_harfbuzz' ] = False
73
73
aot = False
74
74
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
+
76
80
if args .target_os == 'android' :
77
81
gn_args ['target_cpu' ] = args .android_cpu
78
82
elif args .target_os == 'ios' :
@@ -120,9 +124,9 @@ def parse_args(args):
120
124
args = args [1 :]
121
125
parser = argparse .ArgumentParser (description = 'A script run` gn gen`.' )
122
126
123
- parser .add_argument ('--debug ' , default = False , action = 'store_true' )
127
+ parser .add_argument ('--unoptimized ' , default = False , action = 'store_true' )
124
128
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 ' )
126
130
127
131
parser .add_argument ('--experimental-interpreter' , default = False , dest = 'experimental_interpreter' , action = 'store_true' )
128
132
0 commit comments