diff --git a/tools/gn b/tools/gn index 8cf8af92d3166..ee784e5300d33 100755 --- a/tools/gn +++ b/tools/gn @@ -232,8 +232,9 @@ def to_gn_args(args): if args.arm_float_abi: gn_args['arm_float_abi'] = args.arm_float_abi - # Switch flutter to full Dart SDK. - gn_args['dart_platform_sdk'] = False + # Switch flutter to full Dart SDK when building for the host system. + if args.target_os is None: + gn_args['dart_platform_sdk'] = False return gn_args