diff --git a/tools/gn b/tools/gn index 214cc8d02bb6d..4392174eb4739 100755 --- a/tools/gn +++ b/tools/gn @@ -380,6 +380,10 @@ def to_gn_args(args): # on Android. gn_args['bssl_use_clang_integrated_as'] = True + # Enable pointer compression on 64-bit mobile targets. + if args.target_os in ['android', 'ios'] and gn_args['target_cpu'] in ['x64' , 'arm64']: + gn_args['dart_use_compressed_pointers'] = True + return gn_args def parse_args(args):