• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5{
6  'variables': {
7    'v8_code': 1,
8  },
9  'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
10  'targets': [
11    {
12      'target_name': 'unittests',
13      'type': 'executable',
14      'variables': {
15        'optimize': 'max',
16      },
17      'dependencies': [
18        '../../testing/gmock.gyp:gmock',
19        '../../testing/gtest.gyp:gtest',
20        '../../tools/gyp/v8.gyp:v8_libplatform',
21      ],
22      'include_dirs': [
23        '../..',
24      ],
25      'sources': [  ### gcmole(all) ###
26        'atomic-utils-unittest.cc',
27        'base/bits-unittest.cc',
28        'base/cpu-unittest.cc',
29        'base/division-by-constant-unittest.cc',
30        'base/flags-unittest.cc',
31        'base/functional-unittest.cc',
32        'base/logging-unittest.cc',
33        'base/iterator-unittest.cc',
34        'base/platform/condition-variable-unittest.cc',
35        'base/platform/mutex-unittest.cc',
36        'base/platform/platform-unittest.cc',
37        'base/platform/semaphore-unittest.cc',
38        'base/platform/time-unittest.cc',
39        'base/sys-info-unittest.cc',
40        'base/utils/random-number-generator-unittest.cc',
41        'cancelable-tasks-unittest.cc',
42        'char-predicates-unittest.cc',
43        'compiler/branch-elimination-unittest.cc',
44        'compiler/change-lowering-unittest.cc',
45        'compiler/coalesced-live-ranges-unittest.cc',
46        'compiler/common-operator-reducer-unittest.cc',
47        'compiler/common-operator-unittest.cc',
48        'compiler/compiler-test-utils.h',
49        'compiler/control-equivalence-unittest.cc',
50        'compiler/control-flow-optimizer-unittest.cc',
51        'compiler/dead-code-elimination-unittest.cc',
52        'compiler/diamond-unittest.cc',
53        'compiler/escape-analysis-unittest.cc',
54        'compiler/graph-reducer-unittest.cc',
55        'compiler/graph-reducer-unittest.h',
56        'compiler/graph-trimmer-unittest.cc',
57        'compiler/graph-unittest.cc',
58        'compiler/graph-unittest.h',
59        'compiler/instruction-selector-unittest.cc',
60        'compiler/instruction-selector-unittest.h',
61        'compiler/instruction-sequence-unittest.cc',
62        'compiler/instruction-sequence-unittest.h',
63        'compiler/interpreter-assembler-unittest.cc',
64        'compiler/interpreter-assembler-unittest.h',
65        'compiler/js-builtin-reducer-unittest.cc',
66        'compiler/js-context-relaxation-unittest.cc',
67        'compiler/js-intrinsic-lowering-unittest.cc',
68        'compiler/js-operator-unittest.cc',
69        'compiler/js-typed-lowering-unittest.cc',
70        'compiler/linkage-tail-call-unittest.cc',
71        'compiler/liveness-analyzer-unittest.cc',
72        'compiler/live-range-unittest.cc',
73        'compiler/load-elimination-unittest.cc',
74        'compiler/loop-peeling-unittest.cc',
75        'compiler/machine-operator-reducer-unittest.cc',
76        'compiler/machine-operator-unittest.cc',
77        'compiler/move-optimizer-unittest.cc',
78        'compiler/node-cache-unittest.cc',
79        'compiler/node-matchers-unittest.cc',
80        'compiler/node-properties-unittest.cc',
81        'compiler/node-test-utils.cc',
82        'compiler/node-test-utils.h',
83        'compiler/node-unittest.cc',
84        'compiler/opcodes-unittest.cc',
85        'compiler/register-allocator-unittest.cc',
86        'compiler/schedule-unittest.cc',
87        'compiler/select-lowering-unittest.cc',
88        'compiler/scheduler-unittest.cc',
89        'compiler/simplified-operator-reducer-unittest.cc',
90        'compiler/simplified-operator-unittest.cc',
91        'compiler/state-values-utils-unittest.cc',
92        'compiler/tail-call-optimization-unittest.cc',
93        'compiler/typer-unittest.cc',
94        'compiler/value-numbering-reducer-unittest.cc',
95        'compiler/zone-pool-unittest.cc',
96        'counters-unittest.cc',
97        'interpreter/bytecodes-unittest.cc',
98        'interpreter/bytecode-array-builder-unittest.cc',
99        'interpreter/bytecode-array-iterator-unittest.cc',
100        'interpreter/bytecode-register-allocator-unittest.cc',
101        'interpreter/constant-array-builder-unittest.cc',
102        'libplatform/default-platform-unittest.cc',
103        'libplatform/task-queue-unittest.cc',
104        'libplatform/worker-thread-unittest.cc',
105        'heap/bitmap-unittest.cc',
106        'heap/gc-idle-time-handler-unittest.cc',
107        'heap/memory-reducer-unittest.cc',
108        'heap/heap-unittest.cc',
109        'heap/scavenge-job-unittest.cc',
110        'locked-queue-unittest.cc',
111        'run-all-unittests.cc',
112        'runtime/runtime-interpreter-unittest.cc',
113        'test-utils.h',
114        'test-utils.cc',
115        'wasm/ast-decoder-unittest.cc',
116        'wasm/encoder-unittest.cc',
117        'wasm/module-decoder-unittest.cc',
118        'wasm/wasm-macro-gen-unittest.cc',
119      ],
120      'conditions': [
121        ['v8_target_arch=="arm"', {
122          'sources': [  ### gcmole(arch:arm) ###
123            'compiler/arm/instruction-selector-arm-unittest.cc',
124          ],
125        }],
126        ['v8_target_arch=="arm64"', {
127          'sources': [  ### gcmole(arch:arm64) ###
128            'compiler/arm64/instruction-selector-arm64-unittest.cc',
129          ],
130        }],
131        ['v8_target_arch=="ia32"', {
132          'sources': [  ### gcmole(arch:ia32) ###
133            'compiler/ia32/instruction-selector-ia32-unittest.cc',
134          ],
135        }],
136        ['v8_target_arch=="mipsel"', {
137          'sources': [  ### gcmole(arch:mipsel) ###
138            'compiler/mips/instruction-selector-mips-unittest.cc',
139          ],
140        }],
141        ['v8_target_arch=="mips64el"', {
142          'sources': [  ### gcmole(arch:mips64el) ###
143            'compiler/mips64/instruction-selector-mips64-unittest.cc',
144          ],
145        }],
146        ['v8_target_arch=="x64"', {
147          'sources': [  ### gcmole(arch:x64) ###
148            'compiler/x64/instruction-selector-x64-unittest.cc',
149          ],
150        }],
151        ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
152          'sources': [  ### gcmole(arch:ppc) ###
153            'compiler/ppc/instruction-selector-ppc-unittest.cc',
154          ],
155        }],
156        ['OS=="aix"', {
157          'ldflags': [ '-Wl,-bbigtoc' ],
158        }],
159        ['component=="shared_library"', {
160          # compiler-unittests can't be built against a shared library, so we
161          # need to depend on the underlying static target in that case.
162          'dependencies': ['../../tools/gyp/v8.gyp:v8_maybe_snapshot'],
163        }, {
164          'dependencies': ['../../tools/gyp/v8.gyp:v8'],
165        }],
166        ['os_posix == 1', {
167          # TODO(svenpanne): This is a temporary work-around to fix the warnings
168          # that show up because we use -std=gnu++0x instead of -std=c++11.
169          'cflags!': [
170            '-pedantic',
171          ],
172          'direct_dependent_settings': {
173            'cflags!': [
174              '-pedantic',
175            ],
176          },
177        }],
178      ],
179    },
180  ],
181  'conditions': [
182    ['test_isolation_mode != "noop"', {
183      'targets': [
184        {
185          'target_name': 'unittests_run',
186          'type': 'none',
187          'dependencies': [
188            'unittests',
189          ],
190          'includes': [
191            '../../build/isolate.gypi',
192          ],
193          'sources': [
194            'unittests.isolate',
195          ],
196        },
197      ],
198    }],
199  ],
200}
201