Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1042)

Unified Diff: build/config/BUILDCONFIG.gn

Issue 81153003: GN: Add support for 32- and 64-bit cross-compiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/BUILDCONFIG.gn
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index f67106baa3c17dd5347efaa6b033db1f0dcb436f..de1ee08b5bca140bf7fb6957b7f5b3685edf86f6 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -383,20 +383,32 @@ set_defaults("source_set") {
# default toolchain.
if (is_win) {
- if (cpu_arch == "x64") {
+ if (build_cpu_arch == "x64") {
host_toolchain = "//build/toolchain/win:64"
- } else if (cpu_arch == "x86") {
+ } else if (build_cpu_arch == "x86") {
host_toolchain = "//build/toolchain/win:32"
}
- set_default_toolchain(host_toolchain)
+
+ if (cpu_arch == "x64") {
+ set_default_toolchain("//build/toolchain/win:64")
+ } else if (cpu_arch == "x86") {
+ set_default_toolchain("//build/toolchain/win:32")
+ }
} else if (is_linux) {
- host_toolchain = "//build/toolchain/linux:host"
- if (cpu_arch == "arm" && build_cpu_arch != "arm") {
- # Special toolchain for ARM cross-compiling.
- set_default_toolchain("//build/toolchain/linux:arm-cross-compile")
- } else {
- # Use whatever GCC is on the current platform.
- set_default_toolchain(host_toolchain)
+ if (build_cpu_arch == "arm") {
+ host_toolchain = "//build/toolchain/linux:arm"
+ } else if (build_cpu_arch == "x86") {
+ host_toolchain = "//build/toolchain/linux:32"
+ } else if (build_cpu_arch == "x64") {
+ host_toolchain = "//build/toolchain/linux:64"
+ }
+
+ if (build_cpu_arch == "arm") {
+ set_default_toolchain("//build/toolchain/linux:arm")
+ } else if (build_cpu_arch == "x86") {
+ set_default_toolchain("//build/toolchain/linux:32")
+ } else if (build_cpu_arch == "x64") {
+ set_default_toolchain("//build/toolchain/linux:64")
}
} else if (is_mac) {
host_toolchain = "//build/toolchain/mac:clang"
« no previous file with comments | « no previous file | build/config/compiler/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698