From f33db0ff2d2d6b1d174076351a609e83da9918b9 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 28 Oct 2022 11:31:42 -0700 Subject: [PATCH] Buildroot side of change to narrow Windows Android arm hack --- build/config/BUILDCONFIG.gn | 6 +++++- build/toolchain/win/BUILD.gn | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index 31ac906339..b8d0f47b75 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -531,7 +531,11 @@ if (custom_toolchain != "") { } else if (host_os == "mac") { host_toolchain = "//build/toolchain/mac:clang_$host_cpu" } else if (host_os == "win") { - host_toolchain = "//build/toolchain/win:$current_cpu" + if (is_clang) { + host_toolchain = "//build/toolchain/win:clang_$host_cpu" + } else { + host_toolchain = "//build/toolchain/win:$host_cpu" + } } else { assert(false, "Unknown host for android cross compile") } diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn index f8f73326f1..0733d2c240 100644 --- a/build/toolchain/win/BUILD.gn +++ b/build/toolchain/win/BUILD.gn @@ -61,7 +61,7 @@ if (current_toolchain == default_toolchain) { "copy_dlls", rebase_path(root_build_dir), configuration, - target_cpu, + current_cpu, ]) } @@ -284,6 +284,13 @@ if (target_cpu == "x64") { } } +if (target_cpu == "arm") { + # When the target cpu is "arm", we use the 32-bit intel toolchain "x86". + win_toolchains("x86") { + toolchain_arch = "x86" + } +} + if (target_cpu == "arm64") { win_toolchains("arm64") { toolchain_arch = "arm64"