Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 4099e11

Browse files
authored
Buildroot side of change to narrow Windows Android arm hack (#645)
1 parent dcef651 commit 4099e11

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

build/config/BUILDCONFIG.gn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,11 @@ if (custom_toolchain != "") {
531531
} else if (host_os == "mac") {
532532
host_toolchain = "//build/toolchain/mac:clang_$host_cpu"
533533
} else if (host_os == "win") {
534-
host_toolchain = "//build/toolchain/win:$current_cpu"
534+
if (is_clang) {
535+
host_toolchain = "//build/toolchain/win:clang_$host_cpu"
536+
} else {
537+
host_toolchain = "//build/toolchain/win:$host_cpu"
538+
}
535539
} else {
536540
assert(false, "Unknown host for android cross compile")
537541
}

build/toolchain/win/BUILD.gn

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if (current_toolchain == default_toolchain) {
6161
"copy_dlls",
6262
rebase_path(root_build_dir),
6363
configuration,
64-
target_cpu,
64+
current_cpu,
6565
])
6666
}
6767

@@ -284,6 +284,13 @@ if (target_cpu == "x64") {
284284
}
285285
}
286286

287+
if (target_cpu == "arm") {
288+
# When the target cpu is "arm", we use the 32-bit intel toolchain "x86".
289+
win_toolchains("x86") {
290+
toolchain_arch = "x86"
291+
}
292+
}
293+
287294
if (target_cpu == "arm64") {
288295
win_toolchains("arm64") {
289296
toolchain_arch = "arm64"

0 commit comments

Comments
 (0)