This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,13 @@ declare_args() {
2828 # TODO(cyanglaz ): Remove above comment about test flag when the entire iOS embedder supports app extension
2929 # https://github.com/flutter/flutter/issues/124289
3030 darwin_extension_safe = false
31+
32+ # Whether binary size optimizations with the assumption that Impeller is the
33+ # only supported rendering engine are enabled.
34+ #
35+ # See [go/slimpeller-dashboard](https://github.com/orgs/flutter/projects/21)
36+ # for details.
37+ slimpeller = false
3138}
3239
3340# feature_defines_list ---------------------------------------------------------
@@ -62,6 +69,10 @@ if (flutter_runtime_mode == "debug") {
6269 feature_defines_list += [ " FLUTTER_RUNTIME_MODE=0" ]
6370}
6471
72+ if (slimpeller ) {
73+ feature_defines_list += [ " SLIMPELLER=1" ]
74+ }
75+
6576if (is_ios || is_mac ) {
6677 flutter_cflags_objc = [
6778 " -Werror=overriding-method-mismatch" ,
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ def get_out_dir(args):
6868 if args.darwin_extension_safe:
6969 target_dir.append('extension_safe')
7070
71+ if args.slimpeller:
72+ target_dir.append('slimpeller')
73+
7174 if args.target_dir != '':
7275 target_dir = [args.target_dir]
7376
@@ -1260,6 +1263,15 @@ def parse_args(args):
12601263 help='Do not run GN. Instead configure the Impeller cmake example build.',
12611264 )
12621265
1266+ parser.add_argument(
1267+ '--slimpeller',
1268+ default=False,
1269+ action='store_true',
1270+ help='Enable optimizations that attempt to reduce binary size of the ' +
1271+ 'Flutter engine by assuming only the Impeller rendering engine is supported.' +
1272+ 'See [go/slimpeller-dashboard](https://github.com/orgs/flutter/projects/21) for details.'
1273+ )
1274+
12631275 # Sanitizers.
12641276 parser.add_argument('--asan', default=False, action='store_true')
12651277 parser.add_argument('--lsan', default=False, action='store_true')
You can’t perform that action at this time.
0 commit comments