diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-22 22:38:39 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-22 22:38:39 +0000 |
commit | 777ad7fd876f6a3903a7c8b625568fc66413d0ef (patch) | |
tree | d530c6958da118eab020d83c8d64a37e3807a8b0 | |
parent | 06e924a119c089367cdb12d86bca3c00119f939c (diff) | |
download | chromium_src-777ad7fd876f6a3903a7c8b625568fc66413d0ef.zip chromium_src-777ad7fd876f6a3903a7c8b625568fc66413d0ef.tar.gz chromium_src-777ad7fd876f6a3903a7c8b625568fc66413d0ef.tar.bz2 |
Add support for 32-bit and 64-bit Windows compiles in GN.
Rename ia32 and ia64 to x86 and x64
BUG=297677, 322109
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/83733005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236851 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | build/config/BUILDCONFIG.gn | 8 | ||||
-rw-r--r-- | build/config/compiler/BUILD.gn | 2 | ||||
-rw-r--r-- | build/config/win/BUILD.gn | 2 | ||||
-rw-r--r-- | build/toolchain/win/BUILD.gn | 2 | ||||
-rw-r--r-- | tools/gn/args.cc | 16 | ||||
-rw-r--r-- | tools/gn/variables.cc | 4 |
6 files changed, 17 insertions, 17 deletions
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index d3a0683..f67106b 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -150,9 +150,9 @@ if (is_win) { # Always use 32-bit on Windows, even when compiling on a 64-bit host OS, # unless the override flag is specified. if (force_win64) { - cpu_arch = "ia64" + cpu_arch = "x64" } else { - cpu_arch = "ia32" + cpu_arch = "x86" } } @@ -383,9 +383,9 @@ set_defaults("source_set") { # default toolchain. if (is_win) { - if (cpu_arch == "ia64") { + if (cpu_arch == "x64") { host_toolchain = "//build/toolchain/win:64" - } else if (cpu_arch == "ia32") { + } else if (cpu_arch == "x86") { host_toolchain = "//build/toolchain/win:32" } set_default_toolchain(host_toolchain) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 20ffbb5..6f69e05 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -83,7 +83,7 @@ config("compiler") { # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of # address space, and it doesn't support cross-compiling). - if (cpu_arch == "ia64") { + if (cpu_arch == "x64") { gold_path = rebase_path("//third_party/gold", ".", root_build_dir) ldflags += [ "-B$gold_path", diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn index 72147e0..8bedbf5 100644 --- a/build/config/win/BUILD.gn +++ b/build/config/win/BUILD.gn @@ -44,7 +44,7 @@ config("sdk") { # Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs. config("sdk_link") { - if (cpu_arch == "ia64") { + if (cpu_arch == "x64") { ldflags = [ "/MACHINE:X64" ] lib_dirs = [ "$windows_sdk_path\Lib\win8\um\x64", diff --git a/build/toolchain/win/BUILD.gn b/build/toolchain/win/BUILD.gn index 68194ab..6abf808 100644 --- a/build/toolchain/win/BUILD.gn +++ b/build/toolchain/win/BUILD.gn @@ -146,7 +146,7 @@ toolchain("64") { # When invoking this toolchain not as the default one, these args will be # passed to the build. They are ignored when this is the default toolchain. toolchain_args() { - cpu_arch = "ia64" + cpu_arch = "x64" # Normally the build config resets the CPU architecture to 32-bits. Setting # this flag overrides that behavior. force_win64 = true diff --git a/tools/gn/args.cc b/tools/gn/args.cc index 2d9aa6e..04ced9f 100644 --- a/tools/gn/args.cc +++ b/tools/gn/args.cc @@ -179,8 +179,8 @@ void Args::SetSystemVars(Scope* dest) const { dest->SetValue(variables::kOs, os_val, NULL); // Host architecture. - static const char kIa32[] = "ia32"; - static const char kIa64[] = "ia64"; + static const char kX86[] = "x86"; + static const char kX64[] = "x64"; const char* arch = NULL; #if defined(OS_WIN) // ...on Windows, set the CPU architecture based on the underlying OS, not @@ -188,10 +188,10 @@ void Args::SetSystemVars(Scope* dest) const { const base::win::OSInfo* os_info = base::win::OSInfo::GetInstance(); switch (os_info->architecture()) { case base::win::OSInfo::X86_ARCHITECTURE: - arch = kIa32; + arch = kX86; break; case base::win::OSInfo::X64_ARCHITECTURE: - arch = kIa64; + arch = kX64; break; default: CHECK(false) << "Windows architecture not handled."; @@ -201,9 +201,9 @@ void Args::SetSystemVars(Scope* dest) const { // ...on all other platforms, just use the bit-tedness of the current // process. #if defined(ARCH_CPU_X86_64) - arch = kIa64; + arch = kX64; #elif defined(ARCH_CPU_X86) - arch = kIa32; + arch = kX86; #elif defined(ARCH_CPU_ARMEL) static const char kArm[] = "arm"; arch = kArm; @@ -212,8 +212,8 @@ void Args::SetSystemVars(Scope* dest) const { #endif #endif // Avoid unused var warning. - (void)kIa32; - (void)kIa64; + (void)kX86; + (void)kX64; Value arch_val(NULL, std::string(arch)); dest->SetValue(variables::kBuildCpuArch, arch_val, NULL); diff --git a/tools/gn/variables.cc b/tools/gn/variables.cc index 5fe5077..36537fc 100644 --- a/tools/gn/variables.cc +++ b/tools/gn/variables.cc @@ -40,8 +40,8 @@ const char kCpuArch_Help[] = " set it to whatever value is relevant to your build.\n" "\n" "Possible initial values set by GN:\n" - " - \"ia32\"\n" - " - \"ia64\"\n" + " - \"x86\"\n" + " - \"x64\"\n" " - \"arm\"\n"; const char kCurrentToolchain[] = "current_toolchain"; |