diff --git a/DEPS b/DEPS index 240e6d04a3b8c..093e9d05acdb9 100644 --- a/DEPS +++ b/DEPS @@ -118,7 +118,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + 'ad96f00615dc306c22cc09d433eee50392f8033c', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '4099e11fffa406aaa13be8bd512fe5b0ad6262f6', # Fuchsia compatibility # diff --git a/tools/gn b/tools/gn index e231a78191210..27f65988f53b3 100755 --- a/tools/gn +++ b/tools/gn @@ -329,15 +329,18 @@ def to_gn_args(args): gn_args['target_cpu'] = get_target_cpu(args) gn_args['dart_target_arch'] = gn_args['target_cpu'] - # No cross-compilation on Windows (for now). Use host toolchain that - # matches the bit-width of the target architecture. - if sys.platform.startswith(('cygwin', 'win')) and args.target_os != 'win': - cpu = cpu_for_target_arch(gn_args['target_cpu']) - # We explicitly allow arm64 native build. 'host_cpu' key may not exist. - if gn_args.get('host_cpu') == 'arm64' and gn_args['target_cpu'] == 'arm64': - cpu = 'arm64' - gn_args['host_cpu'] = cpu - gn_args['target_cpu'] = cpu + # We cannot cross-compile for 32 bit arm on a Windows host. We work around + # this by leaving 'target_cpu' and 'dart_target_arch' set to 'arm' so that + # Dart tools such as gen_snapshot that are built for the host will correctly + # target arm, but we hardcode the 'current_cpu' to always be the host arch + # so that the GN build doesn't go looking for a Windows arm toolchain, which + # does not exist. Further, we set the 'host_cpu' so that it shares the + # bitwidth of the 32-bit arm target. + if sys.platform.startswith( + ('cygwin', 'win') + ) and args.target_os == 'android' and gn_args['target_cpu'] == 'arm': + gn_args['host_cpu'] = 'x86' + gn_args['current_cpu'] = 'x86' if is_host_build(args) and gn_args['host_os'] == 'mac': # macOS host builds (whether x64 or arm64) must currently be built under