Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 1 | # Copyright 2014 the V8 project authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 5 | # Please keep this file in sync with BUILD.gn. |
| 6 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 7 | { |
| 8 | 'variables': { |
| 9 | 'v8_code': 1, |
| 10 | }, |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 11 | 'includes': ['../../gypfiles/toolchain.gypi', '../../gypfiles/features.gypi'], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 12 | 'targets': [ |
| 13 | { |
| 14 | 'target_name': 'unittests', |
| 15 | 'type': 'executable', |
| 16 | 'variables': { |
| 17 | 'optimize': 'max', |
| 18 | }, |
| 19 | 'dependencies': [ |
| 20 | '../../testing/gmock.gyp:gmock', |
| 21 | '../../testing/gtest.gyp:gtest', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 22 | '../../src/v8.gyp:v8_libplatform', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 23 | ], |
| 24 | 'include_dirs': [ |
| 25 | '../..', |
| 26 | ], |
| 27 | 'sources': [ ### gcmole(all) ### |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 28 | 'base/atomic-utils-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 29 | 'base/bits-unittest.cc', |
| 30 | 'base/cpu-unittest.cc', |
| 31 | 'base/division-by-constant-unittest.cc', |
| 32 | 'base/flags-unittest.cc', |
| 33 | 'base/functional-unittest.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 34 | 'base/ieee754-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 35 | 'base/logging-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 36 | 'base/iterator-unittest.cc', |
| 37 | 'base/platform/condition-variable-unittest.cc', |
| 38 | 'base/platform/mutex-unittest.cc', |
| 39 | 'base/platform/platform-unittest.cc', |
| 40 | 'base/platform/semaphore-unittest.cc', |
| 41 | 'base/platform/time-unittest.cc', |
| 42 | 'base/sys-info-unittest.cc', |
| 43 | 'base/utils/random-number-generator-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 44 | 'cancelable-tasks-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 45 | 'char-predicates-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 46 | 'compiler/branch-elimination-unittest.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 47 | 'compiler/checkpoint-elimination-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 48 | 'compiler/common-operator-reducer-unittest.cc', |
| 49 | 'compiler/common-operator-unittest.cc', |
| 50 | 'compiler/compiler-test-utils.h', |
| 51 | 'compiler/control-equivalence-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 52 | 'compiler/control-flow-optimizer-unittest.cc', |
| 53 | 'compiler/dead-code-elimination-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 54 | 'compiler/diamond-unittest.cc', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 55 | 'compiler/effect-control-linearizer-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 56 | 'compiler/escape-analysis-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 57 | 'compiler/graph-reducer-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 58 | 'compiler/graph-reducer-unittest.h', |
| 59 | 'compiler/graph-trimmer-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 60 | 'compiler/graph-unittest.cc', |
| 61 | 'compiler/graph-unittest.h', |
| 62 | 'compiler/instruction-selector-unittest.cc', |
| 63 | 'compiler/instruction-selector-unittest.h', |
| 64 | 'compiler/instruction-sequence-unittest.cc', |
| 65 | 'compiler/instruction-sequence-unittest.h', |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 66 | 'compiler/int64-lowering-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 67 | 'compiler/js-builtin-reducer-unittest.cc', |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 68 | 'compiler/js-create-lowering-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 69 | 'compiler/js-intrinsic-lowering-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 70 | 'compiler/js-operator-unittest.cc', |
| 71 | 'compiler/js-typed-lowering-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 72 | 'compiler/linkage-tail-call-unittest.cc', |
| 73 | 'compiler/liveness-analyzer-unittest.cc', |
| 74 | 'compiler/live-range-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 75 | 'compiler/load-elimination-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 76 | 'compiler/loop-peeling-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 77 | 'compiler/machine-operator-reducer-unittest.cc', |
| 78 | 'compiler/machine-operator-unittest.cc', |
| 79 | 'compiler/move-optimizer-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 80 | 'compiler/node-cache-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 81 | 'compiler/node-matchers-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 82 | 'compiler/node-properties-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 83 | 'compiler/node-test-utils.cc', |
| 84 | 'compiler/node-test-utils.h', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 85 | 'compiler/node-unittest.cc', |
| 86 | 'compiler/opcodes-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 87 | 'compiler/register-allocator-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 88 | 'compiler/schedule-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 89 | 'compiler/scheduler-unittest.cc', |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 90 | 'compiler/scheduler-rpo-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 91 | 'compiler/simplified-operator-reducer-unittest.cc', |
| 92 | 'compiler/simplified-operator-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 93 | 'compiler/state-values-utils-unittest.cc', |
| 94 | 'compiler/tail-call-optimization-unittest.cc', |
| 95 | 'compiler/typer-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 96 | 'compiler/value-numbering-reducer-unittest.cc', |
| 97 | 'compiler/zone-pool-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 98 | 'counters-unittest.cc', |
| 99 | 'interpreter/bytecodes-unittest.cc', |
| 100 | 'interpreter/bytecode-array-builder-unittest.cc', |
| 101 | 'interpreter/bytecode-array-iterator-unittest.cc', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 102 | 'interpreter/bytecode-array-writer-unittest.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 103 | 'interpreter/bytecode-dead-code-optimizer-unittest.cc', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 104 | 'interpreter/bytecode-peephole-optimizer-unittest.cc', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 105 | 'interpreter/bytecode-pipeline-unittest.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 106 | 'interpreter/bytecode-register-allocator-unittest.cc', |
| 107 | 'interpreter/bytecode-register-optimizer-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 108 | 'interpreter/constant-array-builder-unittest.cc', |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 109 | 'interpreter/interpreter-assembler-unittest.cc', |
| 110 | 'interpreter/interpreter-assembler-unittest.h', |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 111 | 'interpreter/source-position-table-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 112 | 'libplatform/default-platform-unittest.cc', |
| 113 | 'libplatform/task-queue-unittest.cc', |
| 114 | 'libplatform/worker-thread-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 115 | 'heap/bitmap-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 116 | 'heap/gc-idle-time-handler-unittest.cc', |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 117 | 'heap/gc-tracer-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 118 | 'heap/memory-reducer-unittest.cc', |
| 119 | 'heap/heap-unittest.cc', |
| 120 | 'heap/scavenge-job-unittest.cc', |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 121 | 'heap/slot-set-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 122 | 'locked-queue-unittest.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 123 | 'register-configuration-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 124 | 'run-all-unittests.cc', |
| 125 | 'test-utils.h', |
| 126 | 'test-utils.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 127 | 'wasm/asm-types-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 128 | 'wasm/ast-decoder-unittest.cc', |
Ben Murdoch | 61f157c | 2016-09-16 13:49:30 +0100 | [diff] [blame] | 129 | 'wasm/control-transfer-unittest.cc', |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 130 | 'wasm/decoder-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 131 | 'wasm/encoder-unittest.cc', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 132 | 'wasm/leb-helper-unittest.cc', |
Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 133 | 'wasm/loop-assignment-analysis-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 134 | 'wasm/module-decoder-unittest.cc', |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 135 | 'wasm/switch-logic-unittest.cc', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 136 | 'wasm/wasm-macro-gen-unittest.cc', |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 137 | ], |
| 138 | 'conditions': [ |
| 139 | ['v8_target_arch=="arm"', { |
| 140 | 'sources': [ ### gcmole(arch:arm) ### |
| 141 | 'compiler/arm/instruction-selector-arm-unittest.cc', |
| 142 | ], |
| 143 | }], |
| 144 | ['v8_target_arch=="arm64"', { |
| 145 | 'sources': [ ### gcmole(arch:arm64) ### |
| 146 | 'compiler/arm64/instruction-selector-arm64-unittest.cc', |
| 147 | ], |
| 148 | }], |
| 149 | ['v8_target_arch=="ia32"', { |
| 150 | 'sources': [ ### gcmole(arch:ia32) ### |
| 151 | 'compiler/ia32/instruction-selector-ia32-unittest.cc', |
| 152 | ], |
| 153 | }], |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 154 | ['v8_target_arch=="mips"', { |
| 155 | 'sources': [ ### gcmole(arch:mips) ### |
| 156 | 'compiler/mips/instruction-selector-mips-unittest.cc', |
| 157 | ], |
| 158 | }], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 159 | ['v8_target_arch=="mipsel"', { |
| 160 | 'sources': [ ### gcmole(arch:mipsel) ### |
| 161 | 'compiler/mips/instruction-selector-mips-unittest.cc', |
| 162 | ], |
| 163 | }], |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 164 | ['v8_target_arch=="mips64"', { |
| 165 | 'sources': [ ### gcmole(arch:mips64) ### |
| 166 | 'compiler/mips64/instruction-selector-mips64-unittest.cc', |
| 167 | ], |
| 168 | }], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 169 | ['v8_target_arch=="mips64el"', { |
| 170 | 'sources': [ ### gcmole(arch:mips64el) ### |
| 171 | 'compiler/mips64/instruction-selector-mips64-unittest.cc', |
| 172 | ], |
| 173 | }], |
| 174 | ['v8_target_arch=="x64"', { |
| 175 | 'sources': [ ### gcmole(arch:x64) ### |
| 176 | 'compiler/x64/instruction-selector-x64-unittest.cc', |
| 177 | ], |
| 178 | }], |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 179 | ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', { |
| 180 | 'sources': [ ### gcmole(arch:ppc) ### |
| 181 | 'compiler/ppc/instruction-selector-ppc-unittest.cc', |
| 182 | ], |
| 183 | }], |
Ben Murdoch | da12d29 | 2016-06-02 14:46:10 +0100 | [diff] [blame] | 184 | ['v8_target_arch=="s390" or v8_target_arch=="s390x"', { |
| 185 | 'sources': [ ### gcmole(arch:s390) ### |
| 186 | 'compiler/s390/instruction-selector-s390-unittest.cc', |
| 187 | ], |
| 188 | }], |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 189 | ['OS=="aix"', { |
| 190 | 'ldflags': [ '-Wl,-bbigtoc' ], |
| 191 | }], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 192 | ['component=="shared_library"', { |
| 193 | # compiler-unittests can't be built against a shared library, so we |
| 194 | # need to depend on the underlying static target in that case. |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 195 | 'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 196 | }, { |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 197 | 'dependencies': ['../../src/v8.gyp:v8'], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 198 | }], |
| 199 | ['os_posix == 1', { |
| 200 | # TODO(svenpanne): This is a temporary work-around to fix the warnings |
| 201 | # that show up because we use -std=gnu++0x instead of -std=c++11. |
| 202 | 'cflags!': [ |
| 203 | '-pedantic', |
| 204 | ], |
| 205 | 'direct_dependent_settings': { |
| 206 | 'cflags!': [ |
| 207 | '-pedantic', |
| 208 | ], |
| 209 | }, |
| 210 | }], |
| 211 | ], |
| 212 | }, |
| 213 | ], |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 214 | 'conditions': [ |
| 215 | ['test_isolation_mode != "noop"', { |
| 216 | 'targets': [ |
| 217 | { |
| 218 | 'target_name': 'unittests_run', |
| 219 | 'type': 'none', |
| 220 | 'dependencies': [ |
| 221 | 'unittests', |
| 222 | ], |
| 223 | 'includes': [ |
Ben Murdoch | c561043 | 2016-08-08 18:44:38 +0100 | [diff] [blame] | 224 | '../../gypfiles/isolate.gypi', |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame] | 225 | ], |
| 226 | 'sources': [ |
| 227 | 'unittests.isolate', |
| 228 | ], |
| 229 | }, |
| 230 | ], |
| 231 | }], |
| 232 | ], |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 233 | } |