8000 Add “full-dart-debug” that disabled optimizations in the Dart VM. (#8… · flutter/engine@3c93817 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 3c93817

Browse files
authored
Add “full-dart-debug” that disabled optimizations in the Dart VM. (#8147)
1 parent b1b388f commit 3c93817

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tools/gn

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ def to_gn_args(args):
139139
if args.dart_debug:
140140
gn_args['dart_debug'] = True
141141

142+
if args.full_dart_debug:
143+
gn_args['dart_debug'] = True
144+
gn_args['dart_debug_optimization_level'] = '0'
145+
142146
if args.target_os == 'android':
143147
gn_args['target_cpu'] = args.android_cpu
144148
elif args.target_os == 'ios':
@@ -247,7 +251,10 @@ def parse_args(args):
247251
parser.add_argument('--runtime-mode', type=str, choices=['debug', 'profile', 'release'], default='debug')
248252
parser.add_argument('--dynamic', default=False, action='store_true')
249253
parser.add_argument('--interpreter', default=False, action='store_true')
250-
parser.add_argument('--dart-debug', default=False, action='store_true')
254+
parser.add_argument('--dart-debug', default=False, action='store_true', help='Enables assertsion in the Dart VM. ' +
255+
'Does not affect affect optimization levels. If you need to disable optimizations in Dart, use --full-dart-debug')
256+
parser.add_argument('--full-dart-debug', default=False, action='store_true', help='Implies --dart-debug ' +
257+
'and also disables optimizations in the Dart VM making it easier to step through VM code in the debugger.')
251258

252259
parser.add_argument('--target-os', type=str, choices=['android', 'ios', 'linux'])
253260
parser.add_argument('--android', dest='target_os', action='store_const', const='android')

0 commit comments

Comments
 (0)
0