2016-06-01 12:28:57 +00:00
|
|
|
# Copyright 2016 The V8 project authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
import("../../gni/v8.gni")
|
|
|
|
|
2016-06-14 10:07:22 +00:00
|
|
|
v8_executable("unittests") {
|
2016-06-01 12:28:57 +00:00
|
|
|
testonly = true
|
|
|
|
|
2016-09-14 19:02:12 +00:00
|
|
|
sources = [
|
2016-09-20 07:27:52 +00:00
|
|
|
"../../testing/gmock-support.h",
|
|
|
|
"../../testing/gtest-support.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"base/atomic-utils-unittest.cc",
|
|
|
|
"base/bits-unittest.cc",
|
|
|
|
"base/cpu-unittest.cc",
|
|
|
|
"base/division-by-constant-unittest.cc",
|
|
|
|
"base/flags-unittest.cc",
|
|
|
|
"base/functional-unittest.cc",
|
|
|
|
"base/ieee754-unittest.cc",
|
|
|
|
"base/iterator-unittest.cc",
|
|
|
|
"base/logging-unittest.cc",
|
|
|
|
"base/platform/condition-variable-unittest.cc",
|
|
|
|
"base/platform/mutex-unittest.cc",
|
|
|
|
"base/platform/platform-unittest.cc",
|
|
|
|
"base/platform/semaphore-unittest.cc",
|
|
|
|
"base/platform/time-unittest.cc",
|
|
|
|
"base/sys-info-unittest.cc",
|
|
|
|
"base/utils/random-number-generator-unittest.cc",
|
|
|
|
"cancelable-tasks-unittest.cc",
|
|
|
|
"char-predicates-unittest.cc",
|
2016-12-12 15:35:41 +00:00
|
|
|
"compiler-dispatcher/compiler-dispatcher-helper.cc",
|
|
|
|
"compiler-dispatcher/compiler-dispatcher-helper.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler-dispatcher/compiler-dispatcher-job-unittest.cc",
|
2016-10-14 08:12:16 +00:00
|
|
|
"compiler-dispatcher/compiler-dispatcher-tracer-unittest.cc",
|
2016-12-12 15:35:41 +00:00
|
|
|
"compiler-dispatcher/compiler-dispatcher-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/branch-elimination-unittest.cc",
|
2016-12-05 10:47:38 +00:00
|
|
|
"compiler/bytecode-analysis-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/checkpoint-elimination-unittest.cc",
|
|
|
|
"compiler/common-operator-reducer-unittest.cc",
|
|
|
|
"compiler/common-operator-unittest.cc",
|
|
|
|
"compiler/compiler-test-utils.h",
|
|
|
|
"compiler/control-equivalence-unittest.cc",
|
|
|
|
"compiler/control-flow-optimizer-unittest.cc",
|
|
|
|
"compiler/dead-code-elimination-unittest.cc",
|
|
|
|
"compiler/diamond-unittest.cc",
|
|
|
|
"compiler/effect-control-linearizer-unittest.cc",
|
|
|
|
"compiler/escape-analysis-unittest.cc",
|
|
|
|
"compiler/graph-reducer-unittest.cc",
|
|
|
|
"compiler/graph-reducer-unittest.h",
|
|
|
|
"compiler/graph-trimmer-unittest.cc",
|
|
|
|
"compiler/graph-unittest.cc",
|
|
|
|
"compiler/graph-unittest.h",
|
|
|
|
"compiler/instruction-selector-unittest.cc",
|
|
|
|
"compiler/instruction-selector-unittest.h",
|
|
|
|
"compiler/instruction-sequence-unittest.cc",
|
|
|
|
"compiler/instruction-sequence-unittest.h",
|
2016-10-26 16:04:11 +00:00
|
|
|
"compiler/instruction-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/int64-lowering-unittest.cc",
|
|
|
|
"compiler/js-builtin-reducer-unittest.cc",
|
|
|
|
"compiler/js-create-lowering-unittest.cc",
|
|
|
|
"compiler/js-intrinsic-lowering-unittest.cc",
|
|
|
|
"compiler/js-operator-unittest.cc",
|
|
|
|
"compiler/js-typed-lowering-unittest.cc",
|
|
|
|
"compiler/linkage-tail-call-unittest.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"compiler/live-range-builder.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/liveness-analyzer-unittest.cc",
|
|
|
|
"compiler/load-elimination-unittest.cc",
|
|
|
|
"compiler/loop-peeling-unittest.cc",
|
|
|
|
"compiler/machine-operator-reducer-unittest.cc",
|
|
|
|
"compiler/machine-operator-unittest.cc",
|
|
|
|
"compiler/node-cache-unittest.cc",
|
|
|
|
"compiler/node-matchers-unittest.cc",
|
|
|
|
"compiler/node-properties-unittest.cc",
|
|
|
|
"compiler/node-test-utils.cc",
|
|
|
|
"compiler/node-test-utils.h",
|
|
|
|
"compiler/node-unittest.cc",
|
|
|
|
"compiler/opcodes-unittest.cc",
|
2016-12-17 00:24:36 +00:00
|
|
|
"compiler/regalloc/live-range-unittest.cc",
|
|
|
|
"compiler/regalloc/move-optimizer-unittest.cc",
|
|
|
|
"compiler/regalloc/register-allocator-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"compiler/schedule-unittest.cc",
|
|
|
|
"compiler/scheduler-rpo-unittest.cc",
|
|
|
|
"compiler/scheduler-unittest.cc",
|
|
|
|
"compiler/simplified-operator-reducer-unittest.cc",
|
|
|
|
"compiler/simplified-operator-unittest.cc",
|
|
|
|
"compiler/state-values-utils-unittest.cc",
|
|
|
|
"compiler/tail-call-optimization-unittest.cc",
|
|
|
|
"compiler/typed-optimization-unittest.cc",
|
|
|
|
"compiler/typer-unittest.cc",
|
|
|
|
"compiler/value-numbering-reducer-unittest.cc",
|
2016-10-10 19:00:31 +00:00
|
|
|
"compiler/zone-stats-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"counters-unittest.cc",
|
|
|
|
"eh-frame-iterator-unittest.cc",
|
|
|
|
"eh-frame-writer-unittest.cc",
|
|
|
|
"heap/bitmap-unittest.cc",
|
|
|
|
"heap/gc-idle-time-handler-unittest.cc",
|
|
|
|
"heap/gc-tracer-unittest.cc",
|
|
|
|
"heap/heap-unittest.cc",
|
|
|
|
"heap/marking-unittest.cc",
|
|
|
|
"heap/memory-reducer-unittest.cc",
|
|
|
|
"heap/scavenge-job-unittest.cc",
|
|
|
|
"heap/slot-set-unittest.cc",
|
|
|
|
"interpreter/bytecode-array-builder-unittest.cc",
|
|
|
|
"interpreter/bytecode-array-iterator-unittest.cc",
|
2016-12-05 13:03:07 +00:00
|
|
|
"interpreter/bytecode-array-random-iterator-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"interpreter/bytecode-array-writer-unittest.cc",
|
|
|
|
"interpreter/bytecode-dead-code-optimizer-unittest.cc",
|
|
|
|
"interpreter/bytecode-decoder-unittest.cc",
|
2016-12-15 07:55:10 +00:00
|
|
|
"interpreter/bytecode-operands-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"interpreter/bytecode-peephole-optimizer-unittest.cc",
|
|
|
|
"interpreter/bytecode-pipeline-unittest.cc",
|
|
|
|
"interpreter/bytecode-register-allocator-unittest.cc",
|
|
|
|
"interpreter/bytecode-register-optimizer-unittest.cc",
|
2016-09-19 10:58:59 +00:00
|
|
|
"interpreter/bytecode-utils.h",
|
2016-09-14 19:02:12 +00:00
|
|
|
"interpreter/bytecodes-unittest.cc",
|
|
|
|
"interpreter/constant-array-builder-unittest.cc",
|
|
|
|
"interpreter/interpreter-assembler-unittest.cc",
|
|
|
|
"interpreter/interpreter-assembler-unittest.h",
|
|
|
|
"libplatform/default-platform-unittest.cc",
|
|
|
|
"libplatform/task-queue-unittest.cc",
|
|
|
|
"libplatform/worker-thread-unittest.cc",
|
|
|
|
"locked-queue-unittest.cc",
|
|
|
|
"register-configuration-unittest.cc",
|
|
|
|
"run-all-unittests.cc",
|
|
|
|
"source-position-table-unittest.cc",
|
|
|
|
"test-utils.cc",
|
|
|
|
"test-utils.h",
|
2016-11-22 09:27:41 +00:00
|
|
|
"unicode-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
"value-serializer-unittest.cc",
|
|
|
|
"wasm/asm-types-unittest.cc",
|
|
|
|
"wasm/ast-decoder-unittest.cc",
|
|
|
|
"wasm/control-transfer-unittest.cc",
|
|
|
|
"wasm/decoder-unittest.cc",
|
|
|
|
"wasm/leb-helper-unittest.cc",
|
|
|
|
"wasm/loop-assignment-analysis-unittest.cc",
|
|
|
|
"wasm/module-decoder-unittest.cc",
|
|
|
|
"wasm/switch-logic-unittest.cc",
|
|
|
|
"wasm/wasm-macro-gen-unittest.cc",
|
2016-09-29 11:29:05 +00:00
|
|
|
"wasm/wasm-module-builder-unittest.cc",
|
2016-10-20 14:48:13 +00:00
|
|
|
"zone/segmentpool-unittest.cc",
|
2016-10-26 17:07:48 +00:00
|
|
|
"zone/zone-chunk-list-unittest.cc",
|
2016-09-14 19:02:12 +00:00
|
|
|
]
|
2016-06-01 12:28:57 +00:00
|
|
|
|
2016-07-15 22:32:55 +00:00
|
|
|
if (v8_current_cpu == "arm") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/arm/instruction-selector-arm-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "arm64") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/arm64/instruction-selector-arm64-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "x86") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/ia32/instruction-selector-ia32-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/mips/instruction-selector-mips-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "mips64" || v8_current_cpu == "mips64el") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/mips64/instruction-selector-mips64-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "x64") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/x64/instruction-selector-x64-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/ppc/instruction-selector-ppc-unittest.cc" ]
|
2016-07-15 22:32:55 +00:00
|
|
|
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
|
2016-09-14 19:02:12 +00:00
|
|
|
sources += [ "compiler/s390/instruction-selector-s390-unittest.cc" ]
|
2016-06-01 12:28:57 +00:00
|
|
|
}
|
|
|
|
|
2016-06-14 10:07:22 +00:00
|
|
|
configs = [
|
2016-06-01 12:28:57 +00:00
|
|
|
"../..:external_config",
|
|
|
|
"../..:internal_config_base",
|
|
|
|
]
|
|
|
|
|
|
|
|
# TODO(machenbach): Translate from gyp.
|
|
|
|
#['OS=="aix"', {
|
|
|
|
# 'ldflags': [ '-Wl,-bbigtoc' ],
|
|
|
|
#}],
|
|
|
|
|
|
|
|
deps = [
|
2016-10-17 10:01:42 +00:00
|
|
|
"../..:v8",
|
2016-10-07 07:56:43 +00:00
|
|
|
"../..:v8_libbase",
|
2016-06-01 12:28:57 +00:00
|
|
|
"../..:v8_libplatform",
|
|
|
|
"//build/config/sanitizers:deps",
|
|
|
|
"//build/win:default_exe_manifest",
|
|
|
|
"//testing/gmock",
|
|
|
|
"//testing/gtest",
|
|
|
|
]
|
|
|
|
|
2016-11-14 10:00:58 +00:00
|
|
|
if (v8_enable_i18n_support) {
|
|
|
|
deps += [ "//third_party/icu" ]
|
|
|
|
}
|
|
|
|
|
2016-06-03 08:21:11 +00:00
|
|
|
if (is_win) {
|
|
|
|
# This warning is benignly triggered by the U16 and U32 macros in
|
|
|
|
# bytecode-utils.h.
|
|
|
|
# C4309: 'static_cast': truncation of constant value
|
|
|
|
cflags = [ "/wd4309" ]
|
|
|
|
}
|
2016-06-01 12:28:57 +00:00
|
|
|
}
|