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: http://src.chromium.org/svn/trunk/src/build@236851 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
4ee158e4c3
Коммит
f6f4122f10
|
@ -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)
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче