a12d5e7f4bc59930232314ef74b015fee1f6469e
[platform/upstream/nodejs.git] / deps / v8 / test / unittests / unittests.gyp
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         'base/bits-unittest.cc',
27         'base/cpu-unittest.cc',
28         'base/division-by-constant-unittest.cc',
29         'base/flags-unittest.cc',
30         'base/functional-unittest.cc',
31         'base/logging-unittest.cc',
32         'base/iterator-unittest.cc',
33         'base/platform/condition-variable-unittest.cc',
34         'base/platform/mutex-unittest.cc',
35         'base/platform/platform-unittest.cc',
36         'base/platform/semaphore-unittest.cc',
37         'base/platform/time-unittest.cc',
38         'base/sys-info-unittest.cc',
39         'base/utils/random-number-generator-unittest.cc',
40         'char-predicates-unittest.cc',
41         'compiler/change-lowering-unittest.cc',
42         'compiler/common-operator-reducer-unittest.cc',
43         'compiler/common-operator-unittest.cc',
44         'compiler/compiler-test-utils.h',
45         'compiler/control-equivalence-unittest.cc',
46         'compiler/control-flow-optimizer-unittest.cc',
47         'compiler/control-reducer-unittest.cc',
48         'compiler/diamond-unittest.cc',
49         'compiler/graph-reducer-unittest.cc',
50         'compiler/graph-unittest.cc',
51         'compiler/graph-unittest.h',
52         'compiler/instruction-selector-unittest.cc',
53         'compiler/instruction-selector-unittest.h',
54         'compiler/instruction-sequence-unittest.cc',
55         'compiler/instruction-sequence-unittest.h',
56         'compiler/js-builtin-reducer-unittest.cc',
57         'compiler/js-intrinsic-lowering-unittest.cc',
58         'compiler/js-operator-unittest.cc',
59         'compiler/js-typed-lowering-unittest.cc',
60         'compiler/load-elimination-unittest.cc',
61         'compiler/loop-peeling-unittest.cc',
62         'compiler/machine-operator-reducer-unittest.cc',
63         'compiler/machine-operator-unittest.cc',
64         'compiler/move-optimizer-unittest.cc',
65         'compiler/node-matchers-unittest.cc',
66         'compiler/node-properties-unittest.cc',
67         'compiler/node-test-utils.cc',
68         'compiler/node-test-utils.h',
69         'compiler/node-unittest.cc',
70         'compiler/opcodes-unittest.cc',
71         'compiler/register-allocator-unittest.cc',
72         'compiler/schedule-unittest.cc',
73         'compiler/select-lowering-unittest.cc',
74         'compiler/scheduler-unittest.cc',
75         'compiler/simplified-operator-reducer-unittest.cc',
76         'compiler/simplified-operator-unittest.cc',
77         'compiler/typer-unittest.cc',
78         'compiler/value-numbering-reducer-unittest.cc',
79         'compiler/zone-pool-unittest.cc',
80         'libplatform/default-platform-unittest.cc',
81         'libplatform/task-queue-unittest.cc',
82         'libplatform/worker-thread-unittest.cc',
83         'heap/gc-idle-time-handler-unittest.cc',
84         'run-all-unittests.cc',
85         'test-utils.h',
86         'test-utils.cc',
87         '../../src/startup-data-util.h',
88         '../../src/startup-data-util.cc'
89       ],
90       'conditions': [
91         ['v8_target_arch=="arm"', {
92           'sources': [  ### gcmole(arch:arm) ###
93             'compiler/arm/instruction-selector-arm-unittest.cc',
94           ],
95         }],
96         ['v8_target_arch=="arm64"', {
97           'sources': [  ### gcmole(arch:arm64) ###
98             'compiler/arm64/instruction-selector-arm64-unittest.cc',
99           ],
100         }],
101         ['v8_target_arch=="ia32"', {
102           'sources': [  ### gcmole(arch:ia32) ###
103             'compiler/ia32/instruction-selector-ia32-unittest.cc',
104           ],
105         }],
106         ['v8_target_arch=="mipsel"', {
107           'sources': [  ### gcmole(arch:mipsel) ###
108             'compiler/mips/instruction-selector-mips-unittest.cc',
109           ],
110         }],
111         ['v8_target_arch=="mips64el"', {
112           'sources': [  ### gcmole(arch:mips64el) ###
113             'compiler/mips64/instruction-selector-mips64-unittest.cc',
114           ],
115         }],
116         ['v8_target_arch=="x64"', {
117           'sources': [  ### gcmole(arch:x64) ###
118             'compiler/x64/instruction-selector-x64-unittest.cc',
119           ],
120         }],
121         ['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
122           'sources': [  ### gcmole(arch:ppc) ###
123             'compiler/ppc/instruction-selector-ppc-unittest.cc',
124           ],
125         }],
126         ['component=="shared_library"', {
127           # compiler-unittests can't be built against a shared library, so we
128           # need to depend on the underlying static target in that case.
129           'conditions': [
130             ['v8_use_snapshot=="true" and v8_use_external_startup_data==0', {
131               'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
132             }],
133             ['v8_use_snapshot=="true" and v8_use_external_startup_data==1', {
134               'dependencies': ['../../tools/gyp/v8.gyp:v8_external_snapshot'],
135             }],
136             ['v8_use_snapshot!="true"', {
137               'dependencies': ['../../tools/gyp/v8.gyp:v8_nosnapshot'],
138             }],
139           ],
140         }, {
141           'dependencies': ['../../tools/gyp/v8.gyp:v8'],
142         }],
143         ['os_posix == 1', {
144           # TODO(svenpanne): This is a temporary work-around to fix the warnings
145           # that show up because we use -std=gnu++0x instead of -std=c++11.
146           'cflags!': [
147             '-pedantic',
148           ],
149           'direct_dependent_settings': {
150             'cflags!': [
151               '-pedantic',
152             ],
153           },
154         }],
155       ],
156     },
157   ],
158 }