Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
11 changes: 11 additions & 0 deletions tools/gn
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,11 @@ def to_gn_args(args):
gn_args['dart_debug'] = True
gn_args['dart_debug_optimization_level'] = '0'

if args.dart_optimization_level:
gn_args['dart_default_optimization_level'] = args.dart_optimization_level
elif gn_args['target_os'] in ['android', 'ios']:
gn_args['dart_default_optimization_level'] = 'z'

gn_args['flutter_use_fontconfig'] = args.enable_fontconfig
gn_args['dart_component_kind'
] = 'static_library' # Always link Dart in statically.
Expand Down Expand Up @@ -784,6 +789,12 @@ def parse_args(args):
'VM making it easier to step through VM code in the debugger.'
)

parser.add_argument(
'--dart-optimization-level',
type=str,
help='The default optimization level for the Dart VM runtime.',
)

parser.add_argument(
'--target-os',
type=str,
Expand Down