Commit 8756f6e9 authored by dpranke's avatar dpranke Committed by Commit bot

Update GN build to use v8_target_cpu instead of v8_target_arch.

R=jochen@chromium.org, machenbach@chromium.org, thakis@chromium.org
BUG=chromium:619503

Review-Url: https://codereview.chromium.org/2074003002
Cr-Commit-Position: refs/heads/master@{#37048}
parent d5f2ac5e
......@@ -165,7 +165,7 @@ config("toolchain") {
defines = []
cflags = []
if (v8_target_arch == "arm") {
if (v8_target_cpu == "arm") {
defines += [ "V8_TARGET_ARCH_ARM" ]
if (arm_version == 7) {
defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
......@@ -196,12 +196,12 @@ config("toolchain") {
}
}
}
if (v8_target_arch == "arm64") {
if (v8_target_cpu == "arm64") {
defines += [ "V8_TARGET_ARCH_ARM64" ]
}
# TODO(jochen): Add support for mips.
if (v8_target_arch == "mipsel") {
if (v8_target_cpu == "mipsel") {
defines += [ "V8_TARGET_ARCH_MIPS" ]
if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
......@@ -236,7 +236,7 @@ config("toolchain") {
}
# TODO(jochen): Add support for mips64.
if (v8_target_arch == "mips64el") {
if (v8_target_cpu == "mips64el") {
defines += [ "V8_TARGET_ARCH_MIPS64" ]
if (v8_can_use_fpu_instructions) {
defines += [ "CAN_USE_FPU_INSTRUCTIONS" ]
......@@ -258,19 +258,19 @@ config("toolchain") {
defines += [ "_MIPS_ARCH_MIPS64R2" ]
}
}
if (v8_target_arch == "s390" || v8_target_arch == "s390x") {
if (v8_target_cpu == "s390" || v8_target_cpu == "s390x") {
defines += [ "V8_TARGET_ARCH_S390" ]
if (v8_target_arch == "s390x") {
if (v8_target_cpu == "s390x") {
defines += [ "V8_TARGET_ARCH_S390X" ]
}
if (host_cpu == "x64" || host_cpu == "x86") {
defines += [ "V8_TARGET_ARCH_S390_LE_SIM" ]
}
}
if (v8_target_arch == "x86") {
if (v8_target_cpu == "x86") {
defines += [ "V8_TARGET_ARCH_IA32" ]
}
if (v8_target_arch == "x64") {
if (v8_target_cpu == "x64") {
defines += [ "V8_TARGET_ARCH_X64" ]
}
......@@ -1499,7 +1499,7 @@ v8_source_set("v8_base") {
"src/zone.h",
]
if (v8_target_arch == "x86") {
if (v8_target_cpu == "x86") {
sources += [
"src/compiler/ia32/code-generator-ia32.cc",
"src/compiler/ia32/instruction-codes-ia32.h",
......@@ -1537,7 +1537,7 @@ v8_source_set("v8_base") {
"src/regexp/ia32/regexp-macro-assembler-ia32.cc",
"src/regexp/ia32/regexp-macro-assembler-ia32.h",
]
} else if (v8_target_arch == "x64") {
} else if (v8_target_cpu == "x64") {
sources += [
"src/compiler/x64/code-generator-x64.cc",
"src/compiler/x64/instruction-codes-x64.h",
......@@ -1575,7 +1575,7 @@ v8_source_set("v8_base") {
"src/x64/macro-assembler-x64.cc",
"src/x64/macro-assembler-x64.h",
]
} else if (v8_target_arch == "arm") {
} else if (v8_target_cpu == "arm") {
sources += [
"src/arm/assembler-arm-inl.h",
"src/arm/assembler-arm.cc",
......@@ -1618,7 +1618,7 @@ v8_source_set("v8_base") {
"src/regexp/arm/regexp-macro-assembler-arm.cc",
"src/regexp/arm/regexp-macro-assembler-arm.h",
]
} else if (v8_target_arch == "arm64") {
} else if (v8_target_cpu == "arm64") {
sources += [
"src/arm64/assembler-arm64-inl.h",
"src/arm64/assembler-arm64.cc",
......@@ -1674,7 +1674,7 @@ v8_source_set("v8_base") {
"src/regexp/arm64/regexp-macro-assembler-arm64.cc",
"src/regexp/arm64/regexp-macro-assembler-arm64.h",
]
} else if (v8_target_arch == "mipsel") {
} else if (v8_target_cpu == "mipsel") {
sources += [
"src/compiler/mips/code-generator-mips.cc",
"src/compiler/mips/instruction-codes-mips.h",
......@@ -1716,7 +1716,7 @@ v8_source_set("v8_base") {
"src/regexp/mips/regexp-macro-assembler-mips.cc",
"src/regexp/mips/regexp-macro-assembler-mips.h",
]
} else if (v8_target_arch == "mips64el") {
} else if (v8_target_cpu == "mips64el") {
sources += [
"src/compiler/mips64/code-generator-mips64.cc",
"src/compiler/mips64/instruction-codes-mips64.h",
......@@ -1758,7 +1758,7 @@ v8_source_set("v8_base") {
"src/regexp/mips64/regexp-macro-assembler-mips64.cc",
"src/regexp/mips64/regexp-macro-assembler-mips64.h",
]
} else if (v8_target_arch == "s390" || v8_target_arch == "s390x") {
} else if (v8_target_cpu == "s390" || v8_target_cpu == "s390x") {
sources += [
"src/compiler/s390/code-generator-s390.cc",
"src/compiler/s390/instruction-codes-s390.h",
......
......@@ -4,17 +4,18 @@
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//build/config/v8_target_cpu.gni")
import("//gni/v8.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
if (((v8_target_arch == "ia32" ||
v8_target_arch == "x64" ||
v8_target_arch=="x87") &&
if (((v8_target_cpu == "ia32" ||
v8_target_cpu == "x64" ||
v8_target_cpu=="x87") &&
(is_linux || is_mac)) ||
(v8_target_arch == "ppc64" && is_linux)) {
(v8_target_cpu == "ppc64" && is_linux)) {
v8_enable_gdbjit = true
}
......
......@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/v8_target_cpu.gni")
declare_args() {
# Turns on compiler optimizations in V8 in Debug build.
......@@ -15,21 +15,6 @@ declare_args() {
# Use external files for startup data blobs:
# the JS builtins sources and the start snapshot.
v8_use_external_startup_data = !is_ios
# V8 generates code for this architecture. If v8_target_arch differs from
# target_cpu, a simulator will be run.
v8_target_arch = ""
}
if (v8_target_arch == "") {
if (is_msan) {
# Running the V8-generated code on an ARM simulator is a powerful hack that
# allows the tool to see the memory accesses from JITted code. Without this
# flag, JS code causes false positive reports from MSan.
v8_target_arch = "arm64"
} else {
v8_target_arch = target_cpu
}
}
###############################################################################
......
......@@ -173,7 +173,7 @@ v8_executable("cctest") {
"wasm/wasm-run-utils.h",
]
if (v8_target_arch == "arm") {
if (v8_target_cpu == "arm") {
sources += [
"test-assembler-arm.cc",
"test-code-stubs-arm.cc",
......@@ -182,7 +182,7 @@ v8_executable("cctest") {
"test-macro-assembler-arm.cc",
"test-run-wasm-relocation-arm.cc",
]
} else if (v8_target_arch == "arm64") {
} else if (v8_target_cpu == "arm64") {
sources += [
"test-assembler-arm64.cc",
"test-code-stubs-arm64.cc",
......@@ -194,7 +194,7 @@ v8_executable("cctest") {
"test-run-wasm-relocation-arm64.cc",
"test-utils-arm64.cc",
]
} else if (v8_target_arch == "x86") {
} else if (v8_target_cpu == "x86") {
sources += [
"test-assembler-ia32.cc",
"test-code-stubs-ia32.cc",
......@@ -204,7 +204,7 @@ v8_executable("cctest") {
"test-macro-assembler-ia32.cc",
"test-run-wasm-relocation-ia32.cc",
]
} else if (v8_target_arch == "mips") {
} else if (v8_target_cpu == "mips") {
sources += [
"test-assembler-mips.cc",
"test-code-stubs-mips.cc",
......@@ -212,7 +212,7 @@ v8_executable("cctest") {
"test-disasm-mips.cc",
"test-macro-assembler-mips.cc",
]
} else if (v8_target_arch == "mipsel") {
} else if (v8_target_cpu == "mipsel") {
sources += [
"test-assembler-mips.cc",
"test-code-stubs-mips.cc",
......@@ -220,7 +220,7 @@ v8_executable("cctest") {
"test-disasm-mips.cc",
"test-macro-assembler-mips.cc",
]
} else if (v8_target_arch == "mips64") {
} else if (v8_target_cpu == "mips64") {
sources += [
"test-assembler-mips64.cc",
"test-code-stubs-mips64.cc",
......@@ -228,7 +228,7 @@ v8_executable("cctest") {
"test-disasm-mips64.cc",
"test-macro-assembler-mips64.cc",
]
} else if (v8_target_arch == "mips64el") {
} else if (v8_target_cpu == "mips64el") {
sources += [
"test-assembler-mips64.cc",
"test-code-stubs-mips64.cc",
......@@ -236,7 +236,7 @@ v8_executable("cctest") {
"test-disasm-mips64.cc",
"test-macro-assembler-mips64.cc",
]
} else if (v8_target_arch == "x64") {
} else if (v8_target_cpu == "x64") {
sources += [
"test-assembler-x64.cc",
"test-code-stubs-x64.cc",
......@@ -246,7 +246,7 @@ v8_executable("cctest") {
"test-macro-assembler-x64.cc",
"test-run-wasm-relocation-x64.cc",
]
} else if (v8_target_arch == "x87") {
} else if (v8_target_cpu == "x87") {
sources += [
"test-assembler-x87.cc",
"test-code-stubs-x87.cc",
......@@ -256,13 +256,13 @@ v8_executable("cctest") {
"test-macro-assembler-x87.cc",
"test-run-wasm-relocation-x87.cc",
]
} else if (v8_target_arch == "ppc" || v8_target_arch == "ppc64") {
} else if (v8_target_cpu == "ppc" || v8_target_cpu == "ppc64") {
sources += [
"test-assembler-ppc.cc",
"test-code-stubs.cc",
"test-disasm-ppc.cc",
]
} else if (v8_target_arch == "s390" || v8_target_arch == "s390x") {
} else if (v8_target_cpu == "s390" || v8_target_cpu == "s390x") {
sources += [
"test-assembler-s390.cc",
"test-code-stubs.cc",
......@@ -290,9 +290,9 @@ v8_executable("cctest") {
]
# TODO(machenbach): Translate from gyp.
#['v8_target_arch=="ppc" or v8_target_arch=="ppc64" \
# or v8_target_arch=="arm" or v8_target_arch=="arm64" \
# or v8_target_arch=="s390" or v8_target_arch=="s390x"', {
#['v8_target_cpu=="ppc" or v8_target_cpu=="ppc64" \
# or v8_target_cpu=="arm" or v8_target_cpu=="arm64" \
# or v8_target_cpu=="s390" or v8_target_cpu=="s390x"', {
# # disable fmadd/fmsub so that expected results match generated code in
# # RunFloat64MulAndFloat64Add1 and friends.
# 'cflags': ['-ffp-contract=off'],
......
......@@ -118,21 +118,21 @@ v8_executable("unittests") {
"wasm/wasm-macro-gen-unittest.cc",
]
if (v8_target_arch == "arm") {
if (v8_target_cpu == "arm") {
sources += [ "compiler/arm/instruction-selector-arm-unittest.cc" ]
} else if (v8_target_arch == "arm64") {
} else if (v8_target_cpu == "arm64") {
sources += [ "compiler/arm64/instruction-selector-arm64-unittest.cc" ]
} else if (v8_target_arch == "x86") {
} else if (v8_target_cpu == "x86") {
sources += [ "compiler/ia32/instruction-selector-ia32-unittest.cc" ]
} else if (v8_target_arch == "mips" || v8_target_arch == "mipsel") {
} else if (v8_target_cpu == "mips" || v8_target_cpu == "mipsel") {
sources += [ "compiler/mips/instruction-selector-mips-unittest.cc" ]
} else if (v8_target_arch == "mips64" || v8_target_arch == "mips64el") {
} else if (v8_target_cpu == "mips64" || v8_target_cpu == "mips64el") {
sources += [ "compiler/mips64/instruction-selector-mips64-unittest.cc" ]
} else if (v8_target_arch == "x64") {
} else if (v8_target_cpu == "x64") {
sources += [ "compiler/x64/instruction-selector-x64-unittest.cc" ]
} else if (v8_target_arch == "ppc" || v8_target_arch == "ppc64") {
} else if (v8_target_cpu == "ppc" || v8_target_cpu == "ppc64") {
sources += [ "compiler/ppc/instruction-selector-ppc-unittest.cc" ]
} else if (v8_target_arch == "s390" || v8_target_arch == "s390x") {
} else if (v8_target_cpu == "s390" || v8_target_cpu == "s390x") {
sources += [ "compiler/s390/instruction-selector-s390-unittest.cc" ]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment