OLD | NEW |
1 # Copyright 2016 The V8 project authors. All rights reserved. | 1 # Copyright 2016 The V8 project authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("../../gni/v8.gni") | 5 import("../../gni/v8.gni") |
6 | 6 |
7 v8_executable("unittests") { | 7 v8_executable("unittests") { |
8 testonly = true | 8 testonly = true |
9 | 9 |
10 sources = [ | 10 sources = [ |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 sources += [ "compiler/ppc/instruction-selector-ppc-unittest.cc" ] | 146 sources += [ "compiler/ppc/instruction-selector-ppc-unittest.cc" ] |
147 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { | 147 } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { |
148 sources += [ "compiler/s390/instruction-selector-s390-unittest.cc" ] | 148 sources += [ "compiler/s390/instruction-selector-s390-unittest.cc" ] |
149 } | 149 } |
150 | 150 |
151 configs = [ | 151 configs = [ |
152 "../..:external_config", | 152 "../..:external_config", |
153 "../..:internal_config_base", | 153 "../..:internal_config_base", |
154 ] | 154 ] |
155 | 155 |
156 if (is_win) { | |
157 remove_configs = [ "//build/config/win:default_incremental_linking" ] | |
158 configs += [ "//build/config/win:no_incremental_linking" ] | |
159 } | |
160 | |
161 # TODO(machenbach): Translate from gyp. | 156 # TODO(machenbach): Translate from gyp. |
162 #['OS=="aix"', { | 157 #['OS=="aix"', { |
163 # 'ldflags': [ '-Wl,-bbigtoc' ], | 158 # 'ldflags': [ '-Wl,-bbigtoc' ], |
164 #}], | 159 #}], |
165 | 160 |
166 deps = [ | 161 deps = [ |
167 "../..:v8_libbase", | 162 "../..:v8_libbase", |
168 "../..:v8_libplatform", | 163 "../..:v8_libplatform", |
169 "//build/config/sanitizers:deps", | 164 "//build/config/sanitizers:deps", |
170 "//build/win:default_exe_manifest", | 165 "//build/win:default_exe_manifest", |
171 "//testing/gmock", | 166 "//testing/gmock", |
172 "//testing/gtest", | 167 "//testing/gtest", |
173 ] | 168 ] |
174 | 169 |
| 170 defines = [] |
| 171 |
175 if (is_component_build) { | 172 if (is_component_build) { |
176 # compiler-unittests can't be built against a shared library, so we | 173 # compiler-unittests can't be built against a shared library, so we |
177 # need to depend on the underlying static target in that case. | 174 # need to depend on the underlying static target in that case. |
178 deps += [ "../..:v8_maybe_snapshot" ] | 175 deps += [ "../..:v8_maybe_snapshot" ] |
| 176 defines += [ "BUILDING_V8_SHARED" ] |
179 } else { | 177 } else { |
180 deps += [ "../..:v8" ] | 178 deps += [ "../..:v8" ] |
181 } | 179 } |
182 | 180 |
183 if (is_win) { | 181 if (is_win) { |
184 # This warning is benignly triggered by the U16 and U32 macros in | 182 # This warning is benignly triggered by the U16 and U32 macros in |
185 # bytecode-utils.h. | 183 # bytecode-utils.h. |
186 # C4309: 'static_cast': truncation of constant value | 184 # C4309: 'static_cast': truncation of constant value |
187 cflags = [ "/wd4309" ] | 185 cflags = [ "/wd4309" ] |
188 | |
189 # Suppress warnings about importing locally defined symbols. | |
190 if (is_component_build) { | |
191 ldflags = [ | |
192 "/ignore:4049", | |
193 "/ignore:4217", | |
194 ] | |
195 } | |
196 } | 186 } |
197 } | 187 } |
OLD | NEW |