Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: BUILD.gn

Issue 793613003: Revert of Run "gn format" on v8's BUILD.gn file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium 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 # Because standalone V8 builds are not supported, assume this is part of a 5 # Because standalone V8 builds are not supported, assume this is part of a
6 # Chromium build. 6 # Chromium build.
7 import("//build/module_args/v8.gni") 7 import("//build/module_args/v8.gni")
8 8
9 # TODO(jochen): These will need to be user-settable to support standalone V8 9 # TODO(jochen): These will need to be user-settable to support standalone V8
10 # builds. 10 # builds.
11 v8_deprecation_warnings = false 11 v8_deprecation_warnings = false
12 v8_enable_disassembler = false 12 v8_enable_disassembler = false
13 v8_enable_gdbjit = false 13 v8_enable_gdbjit = false
14 v8_enable_handle_zapping = true 14 v8_enable_handle_zapping = true
15 v8_enable_i18n_support = true 15 v8_enable_i18n_support = true
16 v8_enable_verify_heap = false 16 v8_enable_verify_heap = false
17 v8_interpreted_regexp = false 17 v8_interpreted_regexp = false
18 v8_object_print = false 18 v8_object_print = false
19 v8_postmortem_support = false 19 v8_postmortem_support = false
20
21 # TODO(eseidel): The snapshot generated by the GN Android build crashes. 20 # TODO(eseidel): The snapshot generated by the GN Android build crashes.
22 v8_use_snapshot = !is_android 21 v8_use_snapshot = !is_android
23 v8_enable_extra_checks = is_debug 22 v8_enable_extra_checks = is_debug
24 v8_target_arch = cpu_arch 23 v8_target_arch = cpu_arch
25 v8_random_seed = "314159265" 24 v8_random_seed = "314159265"
26 25
26
27 ############################################################################### 27 ###############################################################################
28 # Configurations 28 # Configurations
29 # 29 #
30 config("internal_config") { 30 config("internal_config") {
31 visibility = [ ":*" ] # Only targets in this file can depend on this. 31 visibility = [ ":*" ] # Only targets in this file can depend on this.
32 32
33 include_dirs = [ "." ] 33 include_dirs = [ "." ]
34 34
35 if (component_mode == "shared_library") { 35 if (component_mode == "shared_library") {
36 defines = [ 36 defines = [
(...skipping 20 matching lines...) Expand all
57 } 57 }
58 include_dirs = [ "include" ] 58 include_dirs = [ "include" ]
59 } 59 }
60 60
61 config("features") { 61 config("features") {
62 visibility = [ ":*" ] # Only targets in this file can depend on this. 62 visibility = [ ":*" ] # Only targets in this file can depend on this.
63 63
64 defines = [] 64 defines = []
65 65
66 if (v8_enable_disassembler == true) { 66 if (v8_enable_disassembler == true) {
67 defines += [ "ENABLE_DISASSEMBLER" ] 67 defines += [
68 "ENABLE_DISASSEMBLER",
69 ]
68 } 70 }
69 if (v8_enable_gdbjit == true) { 71 if (v8_enable_gdbjit == true) {
70 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] 72 defines += [
73 "ENABLE_GDB_JIT_INTERFACE",
74 ]
71 } 75 }
72 if (v8_object_print == true) { 76 if (v8_object_print == true) {
73 defines += [ "OBJECT_PRINT" ] 77 defines += [
78 "OBJECT_PRINT",
79 ]
74 } 80 }
75 if (v8_enable_verify_heap == true) { 81 if (v8_enable_verify_heap == true) {
76 defines += [ "VERIFY_HEAP" ] 82 defines += [
83 "VERIFY_HEAP",
84 ]
77 } 85 }
78 if (v8_interpreted_regexp == true) { 86 if (v8_interpreted_regexp == true) {
79 defines += [ "V8_INTERPRETED_REGEXP" ] 87 defines += [
88 "V8_INTERPRETED_REGEXP",
89 ]
80 } 90 }
81 if (v8_deprecation_warnings == true) { 91 if (v8_deprecation_warnings == true) {
82 defines += [ "V8_DEPRECATION_WARNINGS" ] 92 defines += [
93 "V8_DEPRECATION_WARNINGS",
94 ]
83 } 95 }
84 if (v8_enable_i18n_support == true) { 96 if (v8_enable_i18n_support == true) {
85 defines += [ "V8_I18N_SUPPORT" ] 97 defines += [
98 "V8_I18N_SUPPORT",
99 ]
86 } 100 }
87 if (v8_enable_extra_checks == true) { 101 if (v8_enable_extra_checks == true) {
88 defines += [ "ENABLE_EXTRA_CHECKS" ] 102 defines += [
103 "ENABLE_EXTRA_CHECKS",
104 ]
89 } 105 }
90 if (v8_enable_handle_zapping == true) { 106 if (v8_enable_handle_zapping == true) {
91 defines += [ "ENABLE_HANDLE_ZAPPING" ] 107 defines += [
108 "ENABLE_HANDLE_ZAPPING",
109 ]
92 } 110 }
93 if (v8_use_external_startup_data == true) { 111 if (v8_use_external_startup_data == true) {
94 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 112 defines += [
113 "V8_USE_EXTERNAL_STARTUP_DATA",
114 ]
95 } 115 }
96 } 116 }
97 117
98 config("toolchain") { 118 config("toolchain") {
99 visibility = [ ":*" ] # Only targets in this file can depend on this. 119 visibility = [ ":*" ] # Only targets in this file can depend on this.
100 120
101 defines = [] 121 defines = []
102 cflags = [] 122 cflags = []
103 123
104 # TODO(jochen): Add support for arm, mips, mipsel. 124 # TODO(jochen): Add support for arm, mips, mipsel.
105 125
106 if (v8_target_arch == "arm64") { 126 if (v8_target_arch == "arm64") {
107 defines += [ "V8_TARGET_ARCH_ARM64" ] 127 defines += [
128 "V8_TARGET_ARCH_ARM64",
129 ]
108 } 130 }
109 if (v8_target_arch == "x86") { 131 if (v8_target_arch == "x86") {
110 defines += [ "V8_TARGET_ARCH_IA32" ] 132 defines += [
133 "V8_TARGET_ARCH_IA32",
134 ]
111 } 135 }
112 if (v8_target_arch == "x64") { 136 if (v8_target_arch == "x64") {
113 defines += [ "V8_TARGET_ARCH_X64" ] 137 defines += [
138 "V8_TARGET_ARCH_X64",
139 ]
114 } 140 }
115 if (is_win) { 141 if (is_win) {
116 defines += [ "WIN32" ] 142 defines += [
143 "WIN32",
144 ]
117 # TODO(jochen): Support v8_enable_prof. 145 # TODO(jochen): Support v8_enable_prof.
118 } 146 }
119 147
120 # TODO(jochen): Add support for compiling with simulators. 148 # TODO(jochen): Add support for compiling with simulators.
121 149
122 if (is_debug) { 150 if (is_debug) {
123 # TODO(jochen): Add support for different debug optimization levels. 151 # TODO(jochen): Add support for different debug optimization levels.
124 defines += [ 152 defines += [
125 "ENABLE_DISASSEMBLER", 153 "ENABLE_DISASSEMBLER",
126 "V8_ENABLE_CHECKS", 154 "V8_ENABLE_CHECKS",
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 "src/json.js", 197 "src/json.js",
170 "src/array-iterator.js", 198 "src/array-iterator.js",
171 "src/string-iterator.js", 199 "src/string-iterator.js",
172 "src/debug-debugger.js", 200 "src/debug-debugger.js",
173 "src/mirror-debugger.js", 201 "src/mirror-debugger.js",
174 "src/liveedit-debugger.js", 202 "src/liveedit-debugger.js",
175 "src/macros.py", 203 "src/macros.py",
176 ] 204 ]
177 205
178 outputs = [ 206 outputs = [
179 "$target_gen_dir/libraries.cc", 207 "$target_gen_dir/libraries.cc"
180 ] 208 ]
181 209
182 if (v8_enable_i18n_support) { 210 if (v8_enable_i18n_support) {
183 sources += [ "src/i18n.js" ] 211 sources += [ "src/i18n.js" ]
184 } 212 }
185 213
186 args = [ 214 args = [
187 rebase_path("$target_gen_dir/libraries.cc", root_build_dir), 215 rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
188 "CORE", 216 "CORE",
189 ] + rebase_path(sources, root_build_dir) 217 ] + rebase_path(sources, root_build_dir)
190 218
191 if (v8_use_external_startup_data) { 219 if (v8_use_external_startup_data) {
192 outputs += [ "$target_gen_dir/libraries.bin" ] 220 outputs += [ "$target_gen_dir/libraries.bin" ]
193 args += [ 221 args += [
194 "--startup_blob", 222 "--startup_blob",
195 rebase_path("$target_gen_dir/libraries.bin", root_build_dir), 223 rebase_path("$target_gen_dir/libraries.bin", root_build_dir)
196 ] 224 ]
197 } 225 }
198 } 226 }
199 227
200 action("js2c_experimental") { 228 action("js2c_experimental") {
201 visibility = [ ":*" ] # Only targets in this file can depend on this. 229 visibility = [ ":*" ] # Only targets in this file can depend on this.
202 230
203 script = "tools/js2c.py" 231 script = "tools/js2c.py"
204 232
205 # The script depends on this other script, this rule causes a rebuild if it 233 # The script depends on this other script, this rule causes a rebuild if it
206 # changes. 234 # changes.
207 source_prereqs = [ "tools/jsmin.py" ] 235 source_prereqs = [ "tools/jsmin.py" ]
208 236
209 sources = [ 237 sources = [
210 "src/macros.py", 238 "src/macros.py",
211 "src/proxy.js", 239 "src/proxy.js",
212 "src/generator.js", 240 "src/generator.js",
213 "src/harmony-string.js", 241 "src/harmony-string.js",
214 "src/harmony-array.js", 242 "src/harmony-array.js",
215 "src/harmony-array-includes.js", 243 "src/harmony-array-includes.js",
216 "src/harmony-typedarray.js", 244 "src/harmony-typedarray.js",
217 "src/harmony-classes.js", 245 "src/harmony-classes.js",
218 "src/harmony-tostring.js", 246 "src/harmony-tostring.js",
219 "src/harmony-templates.js", 247 "src/harmony-templates.js",
220 "src/harmony-regexp.js", 248 "src/harmony-regexp.js"
221 ] 249 ]
222 250
223 outputs = [ 251 outputs = [
224 "$target_gen_dir/experimental-libraries.cc", 252 "$target_gen_dir/experimental-libraries.cc"
225 ] 253 ]
226 254
227 args = [ 255 args = [
228 rebase_path("$target_gen_dir/experimental-libraries.cc", 256 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir),
229 root_build_dir), 257 "EXPERIMENTAL",
230 "EXPERIMENTAL", 258 ] + rebase_path(sources, root_build_dir)
231 ] + rebase_path(sources, root_build_dir)
232 259
233 if (v8_use_external_startup_data) { 260 if (v8_use_external_startup_data) {
234 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] 261 outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
235 args += [ 262 args += [
236 "--startup_blob", 263 "--startup_blob",
237 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), 264 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir)
238 ] 265 ]
239 } 266 }
240 } 267 }
241 268
242 if (v8_use_external_startup_data) { 269 if (v8_use_external_startup_data) {
243 action("natives_blob") { 270 action("natives_blob") {
244 visibility = [ ":*" ] # Only targets in this file can depend on this. 271 visibility = [ ":*" ] # Only targets in this file can depend on this.
245 272
246 deps = [ 273 deps = [
247 ":js2c", 274 ":js2c",
248 ":js2c_experimental", 275 ":js2c_experimental"
249 ] 276 ]
250 277
251 sources = [ 278 sources = [
252 "$target_gen_dir/libraries.bin", 279 "$target_gen_dir/libraries.bin",
253 "$target_gen_dir/libraries_experimental.bin", 280 "$target_gen_dir/libraries_experimental.bin"
254 ] 281 ]
255 282
256 outputs = [ 283 outputs = [
257 "$root_out_dir/natives_blob.bin", 284 "$root_out_dir/natives_blob.bin"
258 ] 285 ]
259 286
260 script = "tools/concatenate-files.py" 287 script = "tools/concatenate-files.py"
261 288
262 args = rebase_path(sources + outputs, root_build_dir) 289 args = rebase_path(sources + outputs, root_build_dir)
263 } 290 }
264 } 291 }
265 292
266 action("postmortem-metadata") { 293 action("postmortem-metadata") {
267 visibility = [ ":*" ] # Only targets in this file can depend on this. 294 visibility = [ ":*" ] # Only targets in this file can depend on this.
268 295
269 script = "tools/gen-postmortem-metadata.py" 296 script = "tools/gen-postmortem-metadata.py"
270 297
271 sources = [ 298 sources = [
272 "src/objects.h", 299 "src/objects.h",
273 "src/objects-inl.h", 300 "src/objects-inl.h",
274 ] 301 ]
275 302
276 outputs = [ 303 outputs = [
277 "$target_gen_dir/debug-support.cc", 304 "$target_gen_dir/debug-support.cc"
278 ] 305 ]
279 306
280 args = rebase_path(outputs, root_build_dir) + 307 args =
281 rebase_path(sources, root_build_dir) 308 rebase_path(outputs, root_build_dir) +
309 rebase_path(sources, root_build_dir)
282 } 310 }
283 311
284 action("run_mksnapshot") { 312 action("run_mksnapshot") {
285 visibility = [ ":*" ] # Only targets in this file can depend on this. 313 visibility = [ ":*" ] # Only targets in this file can depend on this.
286 314
287 deps = [ 315 deps = [ ":mksnapshot($host_toolchain)" ]
288 ":mksnapshot($host_toolchain)",
289 ]
290 316
291 script = "tools/run.py" 317 script = "tools/run.py"
292 318
293 outputs = [ 319 outputs = [
294 "$target_gen_dir/snapshot.cc", 320 "$target_gen_dir/snapshot.cc"
295 ] 321 ]
296 322
297 args = [ 323 args = [
298 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", 324 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)",
299 "root_out_dir") + "/mksnapshot", 325 "root_out_dir") + "/mksnapshot",
300 root_build_dir), 326 root_build_dir),
301 "--log-snapshot-positions", 327 "--log-snapshot-positions",
302 "--logfile", 328 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
303 rebase_path("$target_gen_dir/snapshot.log", root_build_dir), 329 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir)
304 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir),
305 ] 330 ]
306 331
307 if (v8_random_seed != "0") { 332 if (v8_random_seed != "0") {
308 args += [ 333 args += [ "--random-seed", v8_random_seed ]
309 "--random-seed",
310 v8_random_seed,
311 ]
312 } 334 }
313 335
314 if (v8_use_external_startup_data) { 336 if (v8_use_external_startup_data) {
315 outputs += [ "$root_out_dir/snapshot_blob.bin" ] 337 outputs += [ "$root_out_dir/snapshot_blob.bin" ]
316 args += [ 338 args += [
317 "--startup_blob", 339 "--startup_blob",
318 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), 340 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir)
319 ] 341 ]
320 } 342 }
321 } 343 }
322 344
345
323 ############################################################################### 346 ###############################################################################
324 # Source Sets (aka static libraries) 347 # Source Sets (aka static libraries)
325 # 348 #
326 349
327 source_set("v8_nosnapshot") { 350 source_set("v8_nosnapshot") {
328 visibility = [ ":*" ] # Only targets in this file can depend on this. 351 visibility = [ ":*" ] # Only targets in this file can depend on this.
329 352
330 deps = [ 353 deps = [
331 ":js2c", 354 ":js2c",
332 ":js2c_experimental", 355 ":js2c_experimental",
333 ":v8_base", 356 ":v8_base",
334 ] 357 ]
335 358
336 sources = [ 359 sources = [
337 "$target_gen_dir/libraries.cc", 360 "$target_gen_dir/libraries.cc",
338 "$target_gen_dir/experimental-libraries.cc", 361 "$target_gen_dir/experimental-libraries.cc",
339 "src/snapshot-empty.cc", 362 "src/snapshot-empty.cc",
340 ] 363 ]
341 364
342 configs -= [ "//build/config/compiler:chromium_code" ] 365 configs -= [ "//build/config/compiler:chromium_code" ]
343 configs += [ "//build/config/compiler:no_chromium_code" ] 366 configs += [ "//build/config/compiler:no_chromium_code" ]
344 configs += [ 367 configs += [ ":internal_config", ":features", ":toolchain" ]
345 ":internal_config",
346 ":features",
347 ":toolchain",
348 ]
349 } 368 }
350 369
351 source_set("v8_snapshot") { 370 source_set("v8_snapshot") {
352 visibility = [ ":*" ] # Only targets in this file can depend on this. 371 visibility = [ ":*" ] # Only targets in this file can depend on this.
353 372
354 deps = [ 373 deps = [
355 ":js2c", 374 ":js2c",
356 ":js2c_experimental", 375 ":js2c_experimental",
357 ":run_mksnapshot", 376 ":run_mksnapshot",
358 ":v8_base", 377 ":v8_base",
359 ] 378 ]
360 379
361 sources = [ 380 sources = [
362 "$target_gen_dir/libraries.cc", 381 "$target_gen_dir/libraries.cc",
363 "$target_gen_dir/experimental-libraries.cc", 382 "$target_gen_dir/experimental-libraries.cc",
364 "$target_gen_dir/snapshot.cc", 383 "$target_gen_dir/snapshot.cc",
365 ] 384 ]
366 385
367 configs -= [ "//build/config/compiler:chromium_code" ] 386 configs -= [ "//build/config/compiler:chromium_code" ]
368 configs += [ "//build/config/compiler:no_chromium_code" ] 387 configs += [ "//build/config/compiler:no_chromium_code" ]
369 configs += [ 388 configs += [ ":internal_config", ":features", ":toolchain" ]
370 ":internal_config",
371 ":features",
372 ":toolchain",
373 ]
374 } 389 }
375 390
376 if (v8_use_external_startup_data) { 391 if (v8_use_external_startup_data) {
377 source_set("v8_external_snapshot") { 392 source_set("v8_external_snapshot") {
378 visibility = [ ":*" ] # Only targets in this file can depend on this. 393 visibility = [ ":*" ] # Only targets in this file can depend on this.
379 394
380 deps = [ 395 deps = [
381 ":js2c", 396 ":js2c",
382 ":js2c_experimental", 397 ":js2c_experimental",
383 ":run_mksnapshot", 398 ":run_mksnapshot",
384 ":v8_base", 399 ":v8_base",
385 ":natives_blob", 400 ":natives_blob",
386 ] 401 ]
387 402
388 sources = [ 403 sources = [
389 "src/natives-external.cc", 404 "src/natives-external.cc",
390 "src/snapshot-external.cc", 405 "src/snapshot-external.cc",
391 ] 406 ]
392 407
393 configs -= [ "//build/config/compiler:chromium_code" ] 408 configs -= [ "//build/config/compiler:chromium_code" ]
394 configs += [ "//build/config/compiler:no_chromium_code" ] 409 configs += [ "//build/config/compiler:no_chromium_code" ]
395 configs += [ 410 configs += [ ":internal_config", ":features", ":toolchain" ]
396 ":internal_config",
397 ":features",
398 ":toolchain",
399 ]
400 } 411 }
401 } 412 }
402 413
403 source_set("v8_base") { 414 source_set("v8_base") {
404 visibility = [ ":*" ] # Only targets in this file can depend on this. 415 visibility = [ ":*" ] # Only targets in this file can depend on this.
405 416
406 sources = [ 417 sources = [
407 "src/accessors.cc", 418 "src/accessors.cc",
408 "src/accessors.h", 419 "src/accessors.h",
409 "src/allocation.cc", 420 "src/allocation.cc",
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 "src/ic/mips64/access-compiler-mips64.cc", 1205 "src/ic/mips64/access-compiler-mips64.cc",
1195 "src/ic/mips64/handler-compiler-mips64.cc", 1206 "src/ic/mips64/handler-compiler-mips64.cc",
1196 "src/ic/mips64/ic-mips64.cc", 1207 "src/ic/mips64/ic-mips64.cc",
1197 "src/ic/mips64/ic-compiler-mips64.cc", 1208 "src/ic/mips64/ic-compiler-mips64.cc",
1198 "src/ic/mips64/stub-cache-mips64.cc", 1209 "src/ic/mips64/stub-cache-mips64.cc",
1199 ] 1210 ]
1200 } 1211 }
1201 1212
1202 configs -= [ "//build/config/compiler:chromium_code" ] 1213 configs -= [ "//build/config/compiler:chromium_code" ]
1203 configs += [ "//build/config/compiler:no_chromium_code" ] 1214 configs += [ "//build/config/compiler:no_chromium_code" ]
1204 configs += [ 1215 configs += [ ":internal_config", ":features", ":toolchain" ]
1205 ":internal_config",
1206 ":features",
1207 ":toolchain",
1208 ]
1209 1216
1210 if (!is_debug) { 1217 if (!is_debug) {
1211 configs -= [ "//build/config/compiler:optimize" ] 1218 configs -= [ "//build/config/compiler:optimize" ]
1212 configs += [ "//build/config/compiler:optimize_max" ] 1219 configs += [ "//build/config/compiler:optimize_max" ]
1213 } 1220 }
1214 1221
1215 defines = [] 1222 defines = []
1216 deps = [ 1223 deps = [ ":v8_libbase" ]
1217 ":v8_libbase",
1218 ]
1219 1224
1220 if (is_win) { 1225 if (is_win) {
1221 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1226 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1222 cflags = [ "/wd4267" ] 1227 cflags = [ "/wd4267" ]
1223 } 1228 }
1224 1229
1225 if (v8_enable_i18n_support) { 1230 if (v8_enable_i18n_support) {
1226 deps += [ "//third_party/icu" ] 1231 deps += [ "//third_party/icu" ]
1227 if (is_win) { 1232 if (is_win) {
1228 deps += [ "//third_party/icu:icudata" ] 1233 deps += [ "//third_party/icu:icudata" ]
1229 } 1234 }
1230
1231 # TODO(jochen): Add support for icu_use_data_file_flag 1235 # TODO(jochen): Add support for icu_use_data_file_flag
1232 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] 1236 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
1233 } else { 1237 } else {
1234 sources -= [ 1238 sources -= [
1235 "src/i18n.cc", 1239 "src/i18n.cc",
1236 "src/i18n.h", 1240 "src/i18n.h",
1237 ] 1241 ]
1238 } 1242 }
1239 1243
1240 if (v8_postmortem_support) { 1244 if (v8_postmortem_support) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 "src/base/safe_math.h", 1293 "src/base/safe_math.h",
1290 "src/base/safe_math_impl.h", 1294 "src/base/safe_math_impl.h",
1291 "src/base/sys-info.cc", 1295 "src/base/sys-info.cc",
1292 "src/base/sys-info.h", 1296 "src/base/sys-info.h",
1293 "src/base/utils/random-number-generator.cc", 1297 "src/base/utils/random-number-generator.cc",
1294 "src/base/utils/random-number-generator.h", 1298 "src/base/utils/random-number-generator.h",
1295 ] 1299 ]
1296 1300
1297 configs -= [ "//build/config/compiler:chromium_code" ] 1301 configs -= [ "//build/config/compiler:chromium_code" ]
1298 configs += [ "//build/config/compiler:no_chromium_code" ] 1302 configs += [ "//build/config/compiler:no_chromium_code" ]
1299 configs += [ 1303 configs += [ ":internal_config_base", ":features", ":toolchain" ]
1300 ":internal_config_base",
1301 ":features",
1302 ":toolchain",
1303 ]
1304 1304
1305 if (!is_debug) { 1305 if (!is_debug) {
1306 configs -= [ "//build/config/compiler:optimize" ] 1306 configs -= [ "//build/config/compiler:optimize" ]
1307 configs += [ "//build/config/compiler:optimize_max" ] 1307 configs += [ "//build/config/compiler:optimize_max" ]
1308 } 1308 }
1309 1309
1310 defines = [] 1310 defines = []
1311 1311
1312 if (is_posix) { 1312 if (is_posix) {
1313 sources += [ "src/base/platform/platform-posix.cc" ] 1313 sources += [
1314 "src/base/platform/platform-posix.cc"
1315 ]
1314 } 1316 }
1315 1317
1316 if (is_linux) { 1318 if (is_linux) {
1317 sources += [ "src/base/platform/platform-linux.cc" ] 1319 sources += [
1320 "src/base/platform/platform-linux.cc"
1321 ]
1318 1322
1319 libs = [ "rt" ] 1323 libs = [ "rt" ]
1320 } else if (is_android) { 1324 } else if (is_android) {
1321 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ] 1325 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ]
1322 1326
1323 if (build_os == "mac") { 1327 if (build_os == "mac") {
1324 if (current_toolchain == host_toolchain) { 1328 if (current_toolchain == host_toolchain) {
1325 sources += [ "src/base/platform/platform-macos.cc" ] 1329 sources += [ "src/base/platform/platform-macos.cc" ]
1326 } else { 1330 } else {
1327 sources += [ "src/base/platform/platform-linux.cc" ] 1331 sources += [ "src/base/platform/platform-linux.cc" ]
1328 } 1332 }
1329 } else { 1333 } else {
1330 sources += [ "src/base/platform/platform-linux.cc" ] 1334 sources += [ "src/base/platform/platform-linux.cc" ]
1331 if (current_toolchain == host_toolchain) { 1335 if (current_toolchain == host_toolchain) {
1332 defines += [ "V8_LIBRT_NOT_AVAILABLE" ] 1336 defines += [ "V8_LIBRT_NOT_AVAILABLE" ]
1333 } 1337 }
1334 } 1338 }
1335 } else if (is_mac) { 1339 } else if (is_mac) {
1336 sources += [ "src/base/platform/platform-macos.cc" ] 1340 sources += [ "src/base/platform/platform-macos.cc" ]
1337 } else if (is_win) { 1341 } else if (is_win) {
1338 # TODO(jochen): Add support for cygwin. 1342 # TODO(jochen): Add support for cygwin.
1339 sources += [ 1343 sources += [
1340 "src/base/platform/platform-win32.cc", 1344 "src/base/platform/platform-win32.cc",
1341 "src/base/win32-headers.h", 1345 "src/base/win32-headers.h",
1342 ] 1346 ]
1343 1347
1344 defines += [ "_CRT_RAND_S" ] # for rand_s() 1348 defines += [ "_CRT_RAND_S" ] # for rand_s()
1345 1349
1346 libs = [ 1350 libs = [ "winmm.lib", "ws2_32.lib" ]
1347 "winmm.lib",
1348 "ws2_32.lib",
1349 ]
1350 } 1351 }
1351 1352
1352 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris. 1353 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
1353 } 1354 }
1354 1355
1355 source_set("v8_libplatform") { 1356 source_set("v8_libplatform") {
1356 sources = [ 1357 sources = [
1357 "include/libplatform/libplatform.h", 1358 "include/libplatform/libplatform.h",
1358 "src/libplatform/default-platform.cc", 1359 "src/libplatform/default-platform.cc",
1359 "src/libplatform/default-platform.h", 1360 "src/libplatform/default-platform.h",
1360 "src/libplatform/task-queue.cc", 1361 "src/libplatform/task-queue.cc",
1361 "src/libplatform/task-queue.h", 1362 "src/libplatform/task-queue.h",
1362 "src/libplatform/worker-thread.cc", 1363 "src/libplatform/worker-thread.cc",
1363 "src/libplatform/worker-thread.h", 1364 "src/libplatform/worker-thread.h",
1364 ] 1365 ]
1365 1366
1366 configs -= [ "//build/config/compiler:chromium_code" ] 1367 configs -= [ "//build/config/compiler:chromium_code" ]
1367 configs += [ "//build/config/compiler:no_chromium_code" ] 1368 configs += [ "//build/config/compiler:no_chromium_code" ]
1368 configs += [ 1369 configs += [ ":internal_config_base", ":features", ":toolchain" ]
1369 ":internal_config_base",
1370 ":features",
1371 ":toolchain",
1372 ]
1373 1370
1374 if (!is_debug) { 1371 if (!is_debug) {
1375 configs -= [ "//build/config/compiler:optimize" ] 1372 configs -= [ "//build/config/compiler:optimize" ]
1376 configs += [ "//build/config/compiler:optimize_max" ] 1373 configs += [ "//build/config/compiler:optimize_max" ]
1377 } 1374 }
1378 1375
1379 deps = [ 1376 deps = [
1380 ":v8_libbase", 1377 ":v8_libbase",
1381 ] 1378 ]
1382 } 1379 }
1383 1380
1384 ############################################################################### 1381 ###############################################################################
1385 # Executables 1382 # Executables
1386 # 1383 #
1387 1384
1388 if (current_toolchain == host_toolchain) { 1385 if (current_toolchain == host_toolchain) {
1389 executable("mksnapshot") { 1386 executable("mksnapshot") {
1390 visibility = [ ":*" ] # Only targets in this file can depend on this. 1387 visibility = [ ":*" ] # Only targets in this file can depend on this.
1391 1388
1392 sources = [ 1389 sources = [
1393 "src/mksnapshot.cc", 1390 "src/mksnapshot.cc",
1394 ] 1391 ]
1395 1392
1396 configs -= [ "//build/config/compiler:chromium_code" ] 1393 configs -= [ "//build/config/compiler:chromium_code" ]
1397 configs += [ "//build/config/compiler:no_chromium_code" ] 1394 configs += [ "//build/config/compiler:no_chromium_code" ]
1398 configs += [ 1395 configs += [ ":internal_config", ":features", ":toolchain" ]
1399 ":internal_config",
1400 ":features",
1401 ":toolchain",
1402 ]
1403 1396
1404 deps = [ 1397 deps = [
1405 ":v8_base", 1398 ":v8_base",
1406 ":v8_libplatform", 1399 ":v8_libplatform",
1407 ":v8_nosnapshot", 1400 ":v8_nosnapshot",
1408 "//build/config/sanitizers:deps", 1401 "//build/config/sanitizers:deps",
1409 ] 1402 ]
1410 } 1403 }
1411 } 1404 }
1412 1405
1413 ############################################################################### 1406 ###############################################################################
1414 # Public targets 1407 # Public targets
1415 # 1408 #
1416 1409
1417 if (component_mode == "shared_library") { 1410 if (component_mode == "shared_library") {
1418 component("v8") { 1411
1419 sources = [ 1412 component("v8") {
1420 "src/v8dll-main.cc", 1413 sources = [
1414 "src/v8dll-main.cc",
1415 ]
1416
1417 if (v8_use_snapshot && v8_use_external_startup_data) {
1418 deps = [
1419 ":v8_base",
1420 ":v8_external_snapshot",
1421 ] 1421 ]
1422 } else if (v8_use_snapshot) {
1423 deps = [
1424 ":v8_base",
1425 ":v8_snapshot",
1426 ]
1427 } else {
1428 assert(!v8_use_external_startup_data)
1429 deps = [
1430 ":v8_base",
1431 ":v8_nosnapshot",
1432 ]
1433 }
1422 1434
1423 if (v8_use_snapshot && v8_use_external_startup_data) { 1435 configs -= [ "//build/config/compiler:chromium_code" ]
1424 deps = [ 1436 configs += [ "//build/config/compiler:no_chromium_code" ]
1425 ":v8_base", 1437 configs += [ ":internal_config", ":features", ":toolchain" ]
1426 ":v8_external_snapshot",
1427 ]
1428 } else if (v8_use_snapshot) {
1429 deps = [
1430 ":v8_base",
1431 ":v8_snapshot",
1432 ]
1433 } else {
1434 assert(!v8_use_external_startup_data)
1435 deps = [
1436 ":v8_base",
1437 ":v8_nosnapshot",
1438 ]
1439 }
1440 1438
1441 configs -= [ "//build/config/compiler:chromium_code" ] 1439 direct_dependent_configs = [ ":external_config" ]
1442 configs += [ "//build/config/compiler:no_chromium_code" ]
1443 configs += [
1444 ":internal_config",
1445 ":features",
1446 ":toolchain",
1447 ]
1448 1440
1449 direct_dependent_configs = [ ":external_config" ] 1441 libs = []
1450 1442 if (is_android && current_toolchain != host_toolchain) {
1451 libs = [] 1443 libs += [ "log" ]
1452 if (is_android && current_toolchain != host_toolchain) {
1453 libs += [ "log" ]
1454 }
1455 }
1456 } else {
1457 group("v8") {
1458 if (v8_use_snapshot && v8_use_external_startup_data) {
1459 deps = [
1460 ":v8_base",
1461 ":v8_external_snapshot",
1462 ]
1463 } else if (v8_use_snapshot) {
1464 deps = [
1465 ":v8_base",
1466 ":v8_snapshot",
1467 ]
1468 } else {
1469 assert(!v8_use_external_startup_data)
1470 deps = [
1471 ":v8_base",
1472 ":v8_nosnapshot",
1473 ]
1474 }
1475
1476 direct_dependent_configs = [ ":external_config" ]
1477 } 1444 }
1478 } 1445 }
1446
1447 } else {
1448
1449 group("v8") {
1450 if (v8_use_snapshot && v8_use_external_startup_data) {
1451 deps = [
1452 ":v8_base",
1453 ":v8_external_snapshot",
1454 ]
1455 } else if (v8_use_snapshot) {
1456 deps = [
1457 ":v8_base",
1458 ":v8_snapshot",
1459 ]
1460 } else {
1461 assert(!v8_use_external_startup_data)
1462 deps = [
1463 ":v8_base",
1464 ":v8_nosnapshot",
1465 ]
1466 }
1467
1468 direct_dependent_configs = [ ":external_config" ]
1469 }
1470
1471 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698