mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Allow creating slimpeller engine variants. (flutter/engine#51824)
Fixes https://github.com/flutter/flutter/issues/144432
This commit is contained in:
parent
444c075779
commit
2a07f9e53a
@ -28,6 +28,13 @@ declare_args() {
|
||||
#TODO(cyanglaz): Remove above comment about test flag when the entire iOS embedder supports app extension
|
||||
#https://github.com/flutter/flutter/issues/124289
|
||||
darwin_extension_safe = false
|
||||
|
||||
# Whether binary size optimizations with the assumption that Impeller is the
|
||||
# only supported rendering engine are enabled.
|
||||
#
|
||||
# See [go/slimpeller-dashboard](https://github.com/orgs/flutter/projects/21)
|
||||
# for details.
|
||||
slimpeller = false
|
||||
}
|
||||
|
||||
# feature_defines_list ---------------------------------------------------------
|
||||
@ -62,6 +69,10 @@ if (flutter_runtime_mode == "debug") {
|
||||
feature_defines_list += [ "FLUTTER_RUNTIME_MODE=0" ]
|
||||
}
|
||||
|
||||
if (slimpeller) {
|
||||
feature_defines_list += [ "SLIMPELLER=1" ]
|
||||
}
|
||||
|
||||
if (is_ios || is_mac) {
|
||||
flutter_cflags_objc = [
|
||||
"-Werror=overriding-method-mismatch",
|
||||
|
||||
@ -68,6 +68,9 @@ def get_out_dir(args):
|
||||
if args.darwin_extension_safe:
|
||||
target_dir.append('extension_safe')
|
||||
|
||||
if args.slimpeller:
|
||||
target_dir.append('slimpeller')
|
||||
|
||||
if args.target_dir != '':
|
||||
target_dir = [args.target_dir]
|
||||
|
||||
@ -1260,6 +1263,15 @@ def parse_args(args):
|
||||
help='Do not run GN. Instead configure the Impeller cmake example build.',
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--slimpeller',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='Enable optimizations that attempt to reduce binary size of the ' +
|
||||
'Flutter engine by assuming only the Impeller rendering engine is supported.' +
|
||||
'See [go/slimpeller-dashboard](https://github.com/orgs/flutter/projects/21) for details.'
|
||||
)
|
||||
|
||||
# Sanitizers.
|
||||
parser.add_argument('--asan', default=False, action='store_true')
|
||||
parser.add_argument('--lsan', default=False, action='store_true')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user