blob: 6534eea85948104dffd43635282a3d14f370bc82 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001# Copyright 2014 The Chromium 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
Emily Bernierd0a1eb72015-03-24 16:35:39 -04005# Because standalone V8 builds are not supported, assume this is part of a
6# Chromium build.
7import("//build/module_args/v8.gni")
8
Ben Murdochb8a8cc12014-11-26 15:28:44 +00009# TODO(jochen): These will need to be user-settable to support standalone V8
10# builds.
Ben Murdochb8a8cc12014-11-26 15:28:44 +000011v8_deprecation_warnings = false
12v8_enable_disassembler = false
13v8_enable_gdbjit = false
14v8_enable_handle_zapping = true
15v8_enable_i18n_support = true
16v8_enable_verify_heap = false
17v8_interpreted_regexp = false
18v8_object_print = false
19v8_postmortem_support = false
20v8_use_snapshot = true
Ben Murdochb8a8cc12014-11-26 15:28:44 +000021v8_enable_extra_checks = is_debug
22v8_target_arch = cpu_arch
23v8_random_seed = "314159265"
24
25
26###############################################################################
27# Configurations
28#
29config("internal_config") {
30 visibility = [ ":*" ] # Only targets in this file can depend on this.
31
32 include_dirs = [ "." ]
33
34 if (component_mode == "shared_library") {
35 defines = [
36 "V8_SHARED",
37 "BUILDING_V8_SHARED",
38 ]
39 }
40}
41
42config("internal_config_base") {
43 visibility = [ ":*" ] # Only targets in this file can depend on this.
44
45 include_dirs = [ "." ]
46}
47
48# This config should only be applied to code using V8 and not any V8 code
49# itself.
50config("external_config") {
51 if (is_component_build) {
52 defines = [
53 "V8_SHARED",
54 "USING_V8_SHARED",
55 ]
56 }
57 include_dirs = [ "include" ]
58}
59
60config("features") {
61 visibility = [ ":*" ] # Only targets in this file can depend on this.
62
63 defines = []
64
65 if (v8_enable_disassembler == true) {
66 defines += [
67 "ENABLE_DISASSEMBLER",
68 ]
69 }
70 if (v8_enable_gdbjit == true) {
71 defines += [
72 "ENABLE_GDB_JIT_INTERFACE",
73 ]
74 }
75 if (v8_object_print == true) {
76 defines += [
77 "OBJECT_PRINT",
78 ]
79 }
80 if (v8_enable_verify_heap == true) {
81 defines += [
82 "VERIFY_HEAP",
83 ]
84 }
85 if (v8_interpreted_regexp == true) {
86 defines += [
87 "V8_INTERPRETED_REGEXP",
88 ]
89 }
90 if (v8_deprecation_warnings == true) {
91 defines += [
92 "V8_DEPRECATION_WARNINGS",
93 ]
94 }
95 if (v8_enable_i18n_support == true) {
96 defines += [
97 "V8_I18N_SUPPORT",
98 ]
99 }
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000100 if (v8_enable_extra_checks == true) {
101 defines += [
102 "ENABLE_EXTRA_CHECKS",
103 ]
104 }
105 if (v8_enable_handle_zapping == true) {
106 defines += [
107 "ENABLE_HANDLE_ZAPPING",
108 ]
109 }
110 if (v8_use_external_startup_data == true) {
111 defines += [
112 "V8_USE_EXTERNAL_STARTUP_DATA",
113 ]
114 }
115}
116
117config("toolchain") {
118 visibility = [ ":*" ] # Only targets in this file can depend on this.
119
120 defines = []
121 cflags = []
122
123 # TODO(jochen): Add support for arm, mips, mipsel.
124
125 if (v8_target_arch == "arm64") {
126 defines += [
127 "V8_TARGET_ARCH_ARM64",
128 ]
129 }
130 if (v8_target_arch == "x86") {
131 defines += [
132 "V8_TARGET_ARCH_IA32",
133 ]
134 }
135 if (v8_target_arch == "x64") {
136 defines += [
137 "V8_TARGET_ARCH_X64",
138 ]
139 }
140 if (is_win) {
141 defines += [
142 "WIN32",
143 ]
144 # TODO(jochen): Support v8_enable_prof.
145 }
146
147 # TODO(jochen): Add support for compiling with simulators.
148
149 if (is_debug) {
150 # TODO(jochen): Add support for different debug optimization levels.
151 defines += [
152 "ENABLE_DISASSEMBLER",
153 "V8_ENABLE_CHECKS",
154 "OBJECT_PRINT",
155 "VERIFY_HEAP",
156 "DEBUG",
157 "OPTIMIZED_DEBUG",
158 ]
159 }
160}
161
162###############################################################################
163# Actions
164#
165
166action("js2c") {
167 visibility = [ ":*" ] # Only targets in this file can depend on this.
168
169 script = "tools/js2c.py"
170
171 # The script depends on this other script, this rule causes a rebuild if it
172 # changes.
173 source_prereqs = [ "tools/jsmin.py" ]
174
175 sources = [
176 "src/runtime.js",
177 "src/v8natives.js",
178 "src/symbol.js",
179 "src/array.js",
180 "src/string.js",
181 "src/uri.js",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400182 "src/third_party/fdlibm/fdlibm.js",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000183 "src/math.js",
184 "src/apinatives.js",
185 "src/date.js",
186 "src/regexp.js",
187 "src/arraybuffer.js",
188 "src/typedarray.js",
189 "src/generator.js",
190 "src/object-observe.js",
191 "src/collection.js",
192 "src/weak-collection.js",
193 "src/collection-iterator.js",
194 "src/promise.js",
195 "src/messages.js",
196 "src/json.js",
197 "src/array-iterator.js",
198 "src/string-iterator.js",
199 "src/debug-debugger.js",
200 "src/mirror-debugger.js",
201 "src/liveedit-debugger.js",
202 "src/macros.py",
203 ]
204
205 outputs = [
206 "$target_gen_dir/libraries.cc"
207 ]
208
209 if (v8_enable_i18n_support) {
210 sources += [ "src/i18n.js" ]
211 }
212
213 args = [
214 rebase_path("$target_gen_dir/libraries.cc", root_build_dir),
215 "CORE",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000216 ] + rebase_path(sources, root_build_dir)
217
218 if (v8_use_external_startup_data) {
219 outputs += [ "$target_gen_dir/libraries.bin" ]
220 args += [
221 "--startup_blob",
222 rebase_path("$target_gen_dir/libraries.bin", root_build_dir)
223 ]
224 }
225}
226
227action("js2c_experimental") {
228 visibility = [ ":*" ] # Only targets in this file can depend on this.
229
230 script = "tools/js2c.py"
231
232 # The script depends on this other script, this rule causes a rebuild if it
233 # changes.
234 source_prereqs = [ "tools/jsmin.py" ]
235
236 sources = [
237 "src/macros.py",
238 "src/proxy.js",
239 "src/generator.js",
240 "src/harmony-string.js",
241 "src/harmony-array.js",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400242 "src/harmony-array-includes.js",
243 "src/harmony-typedarray.js",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000244 "src/harmony-classes.js",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400245 "src/harmony-tostring.js",
246 "src/harmony-templates.js",
247 "src/harmony-regexp.js"
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000248 ]
249
250 outputs = [
251 "$target_gen_dir/experimental-libraries.cc"
252 ]
253
254 args = [
255 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir),
256 "EXPERIMENTAL",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000257 ] + rebase_path(sources, root_build_dir)
258
259 if (v8_use_external_startup_data) {
260 outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
261 args += [
262 "--startup_blob",
263 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir)
264 ]
265 }
266}
267
268if (v8_use_external_startup_data) {
269 action("natives_blob") {
270 visibility = [ ":*" ] # Only targets in this file can depend on this.
271
272 deps = [
273 ":js2c",
274 ":js2c_experimental"
275 ]
276
277 sources = [
278 "$target_gen_dir/libraries.bin",
279 "$target_gen_dir/libraries_experimental.bin"
280 ]
281
282 outputs = [
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400283 "$root_out_dir/natives_blob.bin"
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000284 ]
285
286 script = "tools/concatenate-files.py"
287
288 args = rebase_path(sources + outputs, root_build_dir)
289 }
290}
291
292action("postmortem-metadata") {
293 visibility = [ ":*" ] # Only targets in this file can depend on this.
294
295 script = "tools/gen-postmortem-metadata.py"
296
297 sources = [
298 "src/objects.h",
299 "src/objects-inl.h",
300 ]
301
302 outputs = [
303 "$target_gen_dir/debug-support.cc"
304 ]
305
306 args =
307 rebase_path(outputs, root_build_dir) +
308 rebase_path(sources, root_build_dir)
309}
310
311action("run_mksnapshot") {
312 visibility = [ ":*" ] # Only targets in this file can depend on this.
313
314 deps = [ ":mksnapshot($host_toolchain)" ]
315
316 script = "tools/run.py"
317
318 outputs = [
319 "$target_gen_dir/snapshot.cc"
320 ]
321
322 args = [
323 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)",
324 "root_out_dir") + "/mksnapshot",
325 root_build_dir),
326 "--log-snapshot-positions",
327 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir),
328 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir)
329 ]
330
331 if (v8_random_seed != "0") {
332 args += [ "--random-seed", v8_random_seed ]
333 }
334
335 if (v8_use_external_startup_data) {
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400336 outputs += [ "$root_out_dir/snapshot_blob.bin" ]
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000337 args += [
338 "--startup_blob",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400339 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir)
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000340 ]
341 }
342}
343
344
345###############################################################################
346# Source Sets (aka static libraries)
347#
348
349source_set("v8_nosnapshot") {
350 visibility = [ ":*" ] # Only targets in this file can depend on this.
351
352 deps = [
353 ":js2c",
354 ":js2c_experimental",
355 ":v8_base",
356 ]
357
358 sources = [
359 "$target_gen_dir/libraries.cc",
360 "$target_gen_dir/experimental-libraries.cc",
361 "src/snapshot-empty.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000362 ]
363
364 configs -= [ "//build/config/compiler:chromium_code" ]
365 configs += [ "//build/config/compiler:no_chromium_code" ]
366 configs += [ ":internal_config", ":features", ":toolchain" ]
367}
368
369source_set("v8_snapshot") {
370 visibility = [ ":*" ] # Only targets in this file can depend on this.
371
372 deps = [
373 ":js2c",
374 ":js2c_experimental",
375 ":run_mksnapshot",
376 ":v8_base",
377 ]
378
379 sources = [
380 "$target_gen_dir/libraries.cc",
381 "$target_gen_dir/experimental-libraries.cc",
382 "$target_gen_dir/snapshot.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000383 ]
384
385 configs -= [ "//build/config/compiler:chromium_code" ]
386 configs += [ "//build/config/compiler:no_chromium_code" ]
387 configs += [ ":internal_config", ":features", ":toolchain" ]
388}
389
390if (v8_use_external_startup_data) {
391 source_set("v8_external_snapshot") {
392 visibility = [ ":*" ] # Only targets in this file can depend on this.
393
394 deps = [
395 ":js2c",
396 ":js2c_experimental",
397 ":run_mksnapshot",
398 ":v8_base",
399 ":natives_blob",
400 ]
401
402 sources = [
403 "src/natives-external.cc",
404 "src/snapshot-external.cc",
405 ]
406
407 configs -= [ "//build/config/compiler:chromium_code" ]
408 configs += [ "//build/config/compiler:no_chromium_code" ]
409 configs += [ ":internal_config", ":features", ":toolchain" ]
410 }
411}
412
413source_set("v8_base") {
414 visibility = [ ":*" ] # Only targets in this file can depend on this.
415
416 sources = [
417 "src/accessors.cc",
418 "src/accessors.h",
419 "src/allocation.cc",
420 "src/allocation.h",
421 "src/allocation-site-scopes.cc",
422 "src/allocation-site-scopes.h",
423 "src/allocation-tracker.cc",
424 "src/allocation-tracker.h",
425 "src/api.cc",
426 "src/api.h",
427 "src/arguments.cc",
428 "src/arguments.h",
429 "src/assembler.cc",
430 "src/assembler.h",
431 "src/assert-scope.h",
432 "src/assert-scope.cc",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400433 "src/ast-numbering.cc",
434 "src/ast-numbering.h",
435 "src/ast-this-access-visitor.cc",
436 "src/ast-this-access-visitor.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000437 "src/ast-value-factory.cc",
438 "src/ast-value-factory.h",
439 "src/ast.cc",
440 "src/ast.h",
441 "src/background-parsing-task.cc",
442 "src/background-parsing-task.h",
443 "src/bailout-reason.cc",
444 "src/bailout-reason.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400445 "src/basic-block-profiler.cc",
446 "src/basic-block-profiler.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000447 "src/bignum-dtoa.cc",
448 "src/bignum-dtoa.h",
449 "src/bignum.cc",
450 "src/bignum.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400451 "src/bit-vector.cc",
452 "src/bit-vector.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000453 "src/bootstrapper.cc",
454 "src/bootstrapper.h",
455 "src/builtins.cc",
456 "src/builtins.h",
457 "src/bytecodes-irregexp.h",
458 "src/cached-powers.cc",
459 "src/cached-powers.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400460 "src/char-predicates.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000461 "src/char-predicates-inl.h",
462 "src/char-predicates.h",
463 "src/checks.cc",
464 "src/checks.h",
465 "src/circular-queue-inl.h",
466 "src/circular-queue.h",
467 "src/code-factory.cc",
468 "src/code-factory.h",
469 "src/code-stubs.cc",
470 "src/code-stubs.h",
471 "src/code-stubs-hydrogen.cc",
472 "src/code.h",
473 "src/codegen.cc",
474 "src/codegen.h",
475 "src/compilation-cache.cc",
476 "src/compilation-cache.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400477 "src/compilation-statistics.cc",
478 "src/compilation-statistics.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000479 "src/compiler/access-builder.cc",
480 "src/compiler/access-builder.h",
481 "src/compiler/ast-graph-builder.cc",
482 "src/compiler/ast-graph-builder.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400483 "src/compiler/ast-loop-assignment-analyzer.cc",
484 "src/compiler/ast-loop-assignment-analyzer.h",
485 "src/compiler/basic-block-instrumentor.cc",
486 "src/compiler/basic-block-instrumentor.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000487 "src/compiler/change-lowering.cc",
488 "src/compiler/change-lowering.h",
489 "src/compiler/code-generator-impl.h",
490 "src/compiler/code-generator.cc",
491 "src/compiler/code-generator.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400492 "src/compiler/common-node-cache.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000493 "src/compiler/common-node-cache.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400494 "src/compiler/common-operator-reducer.cc",
495 "src/compiler/common-operator-reducer.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000496 "src/compiler/common-operator.cc",
497 "src/compiler/common-operator.h",
498 "src/compiler/control-builders.cc",
499 "src/compiler/control-builders.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400500 "src/compiler/control-equivalence.h",
501 "src/compiler/control-reducer.cc",
502 "src/compiler/control-reducer.h",
503 "src/compiler/diamond.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000504 "src/compiler/frame.h",
505 "src/compiler/gap-resolver.cc",
506 "src/compiler/gap-resolver.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000507 "src/compiler/generic-algorithm.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000508 "src/compiler/graph-builder.cc",
509 "src/compiler/graph-builder.h",
510 "src/compiler/graph-inl.h",
511 "src/compiler/graph-reducer.cc",
512 "src/compiler/graph-reducer.h",
513 "src/compiler/graph-replay.cc",
514 "src/compiler/graph-replay.h",
515 "src/compiler/graph-visualizer.cc",
516 "src/compiler/graph-visualizer.h",
517 "src/compiler/graph.cc",
518 "src/compiler/graph.h",
519 "src/compiler/instruction-codes.h",
520 "src/compiler/instruction-selector-impl.h",
521 "src/compiler/instruction-selector.cc",
522 "src/compiler/instruction-selector.h",
523 "src/compiler/instruction.cc",
524 "src/compiler/instruction.h",
525 "src/compiler/js-builtin-reducer.cc",
526 "src/compiler/js-builtin-reducer.h",
527 "src/compiler/js-context-specialization.cc",
528 "src/compiler/js-context-specialization.h",
529 "src/compiler/js-generic-lowering.cc",
530 "src/compiler/js-generic-lowering.h",
531 "src/compiler/js-graph.cc",
532 "src/compiler/js-graph.h",
533 "src/compiler/js-inlining.cc",
534 "src/compiler/js-inlining.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400535 "src/compiler/js-intrinsic-builder.cc",
536 "src/compiler/js-intrinsic-builder.h",
537 "src/compiler/js-operator.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000538 "src/compiler/js-operator.h",
539 "src/compiler/js-typed-lowering.cc",
540 "src/compiler/js-typed-lowering.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400541 "src/compiler/jump-threading.cc",
542 "src/compiler/jump-threading.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000543 "src/compiler/linkage-impl.h",
544 "src/compiler/linkage.cc",
545 "src/compiler/linkage.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400546 "src/compiler/load-elimination.cc",
547 "src/compiler/load-elimination.h",
548 "src/compiler/loop-analysis.cc",
549 "src/compiler/loop-analysis.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000550 "src/compiler/machine-operator-reducer.cc",
551 "src/compiler/machine-operator-reducer.h",
552 "src/compiler/machine-operator.cc",
553 "src/compiler/machine-operator.h",
554 "src/compiler/machine-type.cc",
555 "src/compiler/machine-type.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400556 "src/compiler/move-optimizer.cc",
557 "src/compiler/move-optimizer.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000558 "src/compiler/node-aux-data-inl.h",
559 "src/compiler/node-aux-data.h",
560 "src/compiler/node-cache.cc",
561 "src/compiler/node-cache.h",
562 "src/compiler/node-matchers.h",
563 "src/compiler/node-properties-inl.h",
564 "src/compiler/node-properties.h",
565 "src/compiler/node.cc",
566 "src/compiler/node.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400567 "src/compiler/opcodes.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000568 "src/compiler/opcodes.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400569 "src/compiler/operator-properties.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000570 "src/compiler/operator-properties.h",
571 "src/compiler/operator.cc",
572 "src/compiler/operator.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000573 "src/compiler/pipeline.cc",
574 "src/compiler/pipeline.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400575 "src/compiler/pipeline-statistics.cc",
576 "src/compiler/pipeline-statistics.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000577 "src/compiler/raw-machine-assembler.cc",
578 "src/compiler/raw-machine-assembler.h",
579 "src/compiler/register-allocator.cc",
580 "src/compiler/register-allocator.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400581 "src/compiler/register-allocator-verifier.cc",
582 "src/compiler/register-allocator-verifier.h",
583 "src/compiler/register-configuration.cc",
584 "src/compiler/register-configuration.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000585 "src/compiler/representation-change.h",
586 "src/compiler/schedule.cc",
587 "src/compiler/schedule.h",
588 "src/compiler/scheduler.cc",
589 "src/compiler/scheduler.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400590 "src/compiler/select-lowering.cc",
591 "src/compiler/select-lowering.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000592 "src/compiler/simplified-lowering.cc",
593 "src/compiler/simplified-lowering.h",
594 "src/compiler/simplified-operator-reducer.cc",
595 "src/compiler/simplified-operator-reducer.h",
596 "src/compiler/simplified-operator.cc",
597 "src/compiler/simplified-operator.h",
598 "src/compiler/source-position.cc",
599 "src/compiler/source-position.h",
600 "src/compiler/typer.cc",
601 "src/compiler/typer.h",
602 "src/compiler/value-numbering-reducer.cc",
603 "src/compiler/value-numbering-reducer.h",
604 "src/compiler/verifier.cc",
605 "src/compiler/verifier.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400606 "src/compiler/zone-pool.cc",
607 "src/compiler/zone-pool.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000608 "src/compiler.cc",
609 "src/compiler.h",
610 "src/contexts.cc",
611 "src/contexts.h",
612 "src/conversions-inl.h",
613 "src/conversions.cc",
614 "src/conversions.h",
615 "src/counters.cc",
616 "src/counters.h",
617 "src/cpu-profiler-inl.h",
618 "src/cpu-profiler.cc",
619 "src/cpu-profiler.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000620 "src/date.cc",
621 "src/date.h",
622 "src/dateparser-inl.h",
623 "src/dateparser.cc",
624 "src/dateparser.h",
625 "src/debug.cc",
626 "src/debug.h",
627 "src/deoptimizer.cc",
628 "src/deoptimizer.h",
629 "src/disasm.h",
630 "src/disassembler.cc",
631 "src/disassembler.h",
632 "src/diy-fp.cc",
633 "src/diy-fp.h",
634 "src/double.h",
635 "src/dtoa.cc",
636 "src/dtoa.h",
637 "src/effects.h",
638 "src/elements-kind.cc",
639 "src/elements-kind.h",
640 "src/elements.cc",
641 "src/elements.h",
642 "src/execution.cc",
643 "src/execution.h",
644 "src/extensions/externalize-string-extension.cc",
645 "src/extensions/externalize-string-extension.h",
646 "src/extensions/free-buffer-extension.cc",
647 "src/extensions/free-buffer-extension.h",
648 "src/extensions/gc-extension.cc",
649 "src/extensions/gc-extension.h",
650 "src/extensions/statistics-extension.cc",
651 "src/extensions/statistics-extension.h",
652 "src/extensions/trigger-failure-extension.cc",
653 "src/extensions/trigger-failure-extension.h",
654 "src/factory.cc",
655 "src/factory.h",
656 "src/fast-dtoa.cc",
657 "src/fast-dtoa.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000658 "src/field-index.h",
659 "src/field-index-inl.h",
660 "src/fixed-dtoa.cc",
661 "src/fixed-dtoa.h",
662 "src/flag-definitions.h",
663 "src/flags.cc",
664 "src/flags.h",
665 "src/frames-inl.h",
666 "src/frames.cc",
667 "src/frames.h",
668 "src/full-codegen.cc",
669 "src/full-codegen.h",
670 "src/func-name-inferrer.cc",
671 "src/func-name-inferrer.h",
672 "src/gdb-jit.cc",
673 "src/gdb-jit.h",
674 "src/global-handles.cc",
675 "src/global-handles.h",
676 "src/globals.h",
677 "src/handles-inl.h",
678 "src/handles.cc",
679 "src/handles.h",
680 "src/hashmap.h",
681 "src/heap-profiler.cc",
682 "src/heap-profiler.h",
683 "src/heap-snapshot-generator-inl.h",
684 "src/heap-snapshot-generator.cc",
685 "src/heap-snapshot-generator.h",
686 "src/heap/gc-idle-time-handler.cc",
687 "src/heap/gc-idle-time-handler.h",
688 "src/heap/gc-tracer.cc",
689 "src/heap/gc-tracer.h",
690 "src/heap/heap-inl.h",
691 "src/heap/heap.cc",
692 "src/heap/heap.h",
693 "src/heap/incremental-marking.cc",
694 "src/heap/incremental-marking.h",
695 "src/heap/mark-compact-inl.h",
696 "src/heap/mark-compact.cc",
697 "src/heap/mark-compact.h",
698 "src/heap/objects-visiting-inl.h",
699 "src/heap/objects-visiting.cc",
700 "src/heap/objects-visiting.h",
701 "src/heap/spaces-inl.h",
702 "src/heap/spaces.cc",
703 "src/heap/spaces.h",
704 "src/heap/store-buffer-inl.h",
705 "src/heap/store-buffer.cc",
706 "src/heap/store-buffer.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000707 "src/hydrogen-alias-analysis.h",
708 "src/hydrogen-bce.cc",
709 "src/hydrogen-bce.h",
710 "src/hydrogen-bch.cc",
711 "src/hydrogen-bch.h",
712 "src/hydrogen-canonicalize.cc",
713 "src/hydrogen-canonicalize.h",
714 "src/hydrogen-check-elimination.cc",
715 "src/hydrogen-check-elimination.h",
716 "src/hydrogen-dce.cc",
717 "src/hydrogen-dce.h",
718 "src/hydrogen-dehoist.cc",
719 "src/hydrogen-dehoist.h",
720 "src/hydrogen-environment-liveness.cc",
721 "src/hydrogen-environment-liveness.h",
722 "src/hydrogen-escape-analysis.cc",
723 "src/hydrogen-escape-analysis.h",
724 "src/hydrogen-flow-engine.h",
725 "src/hydrogen-instructions.cc",
726 "src/hydrogen-instructions.h",
727 "src/hydrogen.cc",
728 "src/hydrogen.h",
729 "src/hydrogen-gvn.cc",
730 "src/hydrogen-gvn.h",
731 "src/hydrogen-infer-representation.cc",
732 "src/hydrogen-infer-representation.h",
733 "src/hydrogen-infer-types.cc",
734 "src/hydrogen-infer-types.h",
735 "src/hydrogen-load-elimination.cc",
736 "src/hydrogen-load-elimination.h",
737 "src/hydrogen-mark-deoptimize.cc",
738 "src/hydrogen-mark-deoptimize.h",
739 "src/hydrogen-mark-unreachable.cc",
740 "src/hydrogen-mark-unreachable.h",
741 "src/hydrogen-osr.cc",
742 "src/hydrogen-osr.h",
743 "src/hydrogen-range-analysis.cc",
744 "src/hydrogen-range-analysis.h",
745 "src/hydrogen-redundant-phi.cc",
746 "src/hydrogen-redundant-phi.h",
747 "src/hydrogen-removable-simulates.cc",
748 "src/hydrogen-removable-simulates.h",
749 "src/hydrogen-representation-changes.cc",
750 "src/hydrogen-representation-changes.h",
751 "src/hydrogen-sce.cc",
752 "src/hydrogen-sce.h",
753 "src/hydrogen-store-elimination.cc",
754 "src/hydrogen-store-elimination.h",
755 "src/hydrogen-types.cc",
756 "src/hydrogen-types.h",
757 "src/hydrogen-uint32-analysis.cc",
758 "src/hydrogen-uint32-analysis.h",
759 "src/i18n.cc",
760 "src/i18n.h",
761 "src/icu_util.cc",
762 "src/icu_util.h",
763 "src/ic/access-compiler.cc",
764 "src/ic/access-compiler.h",
765 "src/ic/call-optimization.cc",
766 "src/ic/call-optimization.h",
767 "src/ic/handler-compiler.cc",
768 "src/ic/handler-compiler.h",
769 "src/ic/ic-inl.h",
770 "src/ic/ic-state.cc",
771 "src/ic/ic-state.h",
772 "src/ic/ic.cc",
773 "src/ic/ic.h",
774 "src/ic/ic-compiler.cc",
775 "src/ic/ic-compiler.h",
776 "src/ic/stub-cache.cc",
777 "src/ic/stub-cache.h",
778 "src/interface.cc",
779 "src/interface.h",
780 "src/interface-descriptors.cc",
781 "src/interface-descriptors.h",
782 "src/interpreter-irregexp.cc",
783 "src/interpreter-irregexp.h",
784 "src/isolate.cc",
785 "src/isolate.h",
786 "src/json-parser.h",
787 "src/json-stringifier.h",
788 "src/jsregexp-inl.h",
789 "src/jsregexp.cc",
790 "src/jsregexp.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400791 "src/layout-descriptor-inl.h",
792 "src/layout-descriptor.cc",
793 "src/layout-descriptor.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000794 "src/list-inl.h",
795 "src/list.h",
796 "src/lithium-allocator-inl.h",
797 "src/lithium-allocator.cc",
798 "src/lithium-allocator.h",
799 "src/lithium-codegen.cc",
800 "src/lithium-codegen.h",
801 "src/lithium.cc",
802 "src/lithium.h",
803 "src/liveedit.cc",
804 "src/liveedit.h",
805 "src/log-inl.h",
806 "src/log-utils.cc",
807 "src/log-utils.h",
808 "src/log.cc",
809 "src/log.h",
810 "src/lookup-inl.h",
811 "src/lookup.cc",
812 "src/lookup.h",
813 "src/macro-assembler.h",
814 "src/messages.cc",
815 "src/messages.h",
816 "src/msan.h",
817 "src/natives.h",
818 "src/objects-debug.cc",
819 "src/objects-inl.h",
820 "src/objects-printer.cc",
821 "src/objects.cc",
822 "src/objects.h",
823 "src/optimizing-compiler-thread.cc",
824 "src/optimizing-compiler-thread.h",
825 "src/ostreams.cc",
826 "src/ostreams.h",
827 "src/parser.cc",
828 "src/parser.h",
829 "src/perf-jit.cc",
830 "src/perf-jit.h",
831 "src/preparse-data-format.h",
832 "src/preparse-data.cc",
833 "src/preparse-data.h",
834 "src/preparser.cc",
835 "src/preparser.h",
836 "src/prettyprinter.cc",
837 "src/prettyprinter.h",
838 "src/profile-generator-inl.h",
839 "src/profile-generator.cc",
840 "src/profile-generator.h",
841 "src/property-details.h",
842 "src/property.cc",
843 "src/property.h",
844 "src/prototype.h",
845 "src/regexp-macro-assembler-irregexp-inl.h",
846 "src/regexp-macro-assembler-irregexp.cc",
847 "src/regexp-macro-assembler-irregexp.h",
848 "src/regexp-macro-assembler-tracer.cc",
849 "src/regexp-macro-assembler-tracer.h",
850 "src/regexp-macro-assembler.cc",
851 "src/regexp-macro-assembler.h",
852 "src/regexp-stack.cc",
853 "src/regexp-stack.h",
854 "src/rewriter.cc",
855 "src/rewriter.h",
856 "src/runtime-profiler.cc",
857 "src/runtime-profiler.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400858 "src/runtime/runtime-api.cc",
859 "src/runtime/runtime-array.cc",
860 "src/runtime/runtime-classes.cc",
861 "src/runtime/runtime-collections.cc",
862 "src/runtime/runtime-compiler.cc",
863 "src/runtime/runtime-date.cc",
864 "src/runtime/runtime-debug.cc",
865 "src/runtime/runtime-function.cc",
866 "src/runtime/runtime-generator.cc",
867 "src/runtime/runtime-i18n.cc",
868 "src/runtime/runtime-internal.cc",
869 "src/runtime/runtime-json.cc",
870 "src/runtime/runtime-literals.cc",
871 "src/runtime/runtime-liveedit.cc",
872 "src/runtime/runtime-maths.cc",
873 "src/runtime/runtime-numbers.cc",
874 "src/runtime/runtime-object.cc",
875 "src/runtime/runtime-observe.cc",
876 "src/runtime/runtime-proxy.cc",
877 "src/runtime/runtime-regexp.cc",
878 "src/runtime/runtime-scopes.cc",
879 "src/runtime/runtime-strings.cc",
880 "src/runtime/runtime-symbol.cc",
881 "src/runtime/runtime-test.cc",
882 "src/runtime/runtime-typedarray.cc",
883 "src/runtime/runtime-uri.cc",
884 "src/runtime/runtime-utils.h",
885 "src/runtime/runtime.cc",
886 "src/runtime/runtime.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000887 "src/safepoint-table.cc",
888 "src/safepoint-table.h",
889 "src/sampler.cc",
890 "src/sampler.h",
891 "src/scanner-character-streams.cc",
892 "src/scanner-character-streams.h",
893 "src/scanner.cc",
894 "src/scanner.h",
895 "src/scopeinfo.cc",
896 "src/scopeinfo.h",
897 "src/scopes.cc",
898 "src/scopes.h",
899 "src/serialize.cc",
900 "src/serialize.h",
901 "src/small-pointer-list.h",
902 "src/smart-pointers.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400903 "src/snapshot-common.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000904 "src/snapshot-source-sink.cc",
905 "src/snapshot-source-sink.h",
906 "src/snapshot.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400907 "src/string-builder.cc",
908 "src/string-builder.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000909 "src/string-search.cc",
910 "src/string-search.h",
911 "src/string-stream.cc",
912 "src/string-stream.h",
913 "src/strtod.cc",
914 "src/strtod.h",
915 "src/token.cc",
916 "src/token.h",
917 "src/transitions-inl.h",
918 "src/transitions.cc",
919 "src/transitions.h",
920 "src/type-feedback-vector-inl.h",
921 "src/type-feedback-vector.cc",
922 "src/type-feedback-vector.h",
923 "src/type-info.cc",
924 "src/type-info.h",
925 "src/types-inl.h",
926 "src/types.cc",
927 "src/types.h",
928 "src/typing.cc",
929 "src/typing.h",
930 "src/unbound-queue-inl.h",
931 "src/unbound-queue.h",
932 "src/unicode-inl.h",
933 "src/unicode.cc",
934 "src/unicode.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400935 "src/unicode-decoder.cc",
936 "src/unicode-decoder.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000937 "src/unique.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000938 "src/utils-inl.h",
939 "src/utils.cc",
940 "src/utils.h",
941 "src/v8.cc",
942 "src/v8.h",
943 "src/v8memory.h",
944 "src/v8threads.cc",
945 "src/v8threads.h",
946 "src/variables.cc",
947 "src/variables.h",
948 "src/version.cc",
949 "src/version.h",
950 "src/vm-state-inl.h",
951 "src/vm-state.h",
952 "src/zone-inl.h",
953 "src/zone.cc",
954 "src/zone.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400955 "src/third_party/fdlibm/fdlibm.cc",
956 "src/third_party/fdlibm/fdlibm.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000957 ]
958
959 if (v8_target_arch == "x86") {
960 sources += [
961 "src/ia32/assembler-ia32-inl.h",
962 "src/ia32/assembler-ia32.cc",
963 "src/ia32/assembler-ia32.h",
964 "src/ia32/builtins-ia32.cc",
965 "src/ia32/code-stubs-ia32.cc",
966 "src/ia32/code-stubs-ia32.h",
967 "src/ia32/codegen-ia32.cc",
968 "src/ia32/codegen-ia32.h",
969 "src/ia32/cpu-ia32.cc",
970 "src/ia32/debug-ia32.cc",
971 "src/ia32/deoptimizer-ia32.cc",
972 "src/ia32/disasm-ia32.cc",
973 "src/ia32/frames-ia32.cc",
974 "src/ia32/frames-ia32.h",
975 "src/ia32/full-codegen-ia32.cc",
976 "src/ia32/interface-descriptors-ia32.cc",
977 "src/ia32/lithium-codegen-ia32.cc",
978 "src/ia32/lithium-codegen-ia32.h",
979 "src/ia32/lithium-gap-resolver-ia32.cc",
980 "src/ia32/lithium-gap-resolver-ia32.h",
981 "src/ia32/lithium-ia32.cc",
982 "src/ia32/lithium-ia32.h",
983 "src/ia32/macro-assembler-ia32.cc",
984 "src/ia32/macro-assembler-ia32.h",
985 "src/ia32/regexp-macro-assembler-ia32.cc",
986 "src/ia32/regexp-macro-assembler-ia32.h",
987 "src/compiler/ia32/code-generator-ia32.cc",
988 "src/compiler/ia32/instruction-codes-ia32.h",
989 "src/compiler/ia32/instruction-selector-ia32.cc",
990 "src/compiler/ia32/linkage-ia32.cc",
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400991 "src/ic/ia32/access-compiler-ia32.cc",
992 "src/ic/ia32/handler-compiler-ia32.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +0000993 "src/ic/ia32/ic-ia32.cc",
994 "src/ic/ia32/ic-compiler-ia32.cc",
995 "src/ic/ia32/stub-cache-ia32.cc",
996 ]
997 } else if (v8_target_arch == "x64") {
998 sources += [
999 "src/x64/assembler-x64-inl.h",
1000 "src/x64/assembler-x64.cc",
1001 "src/x64/assembler-x64.h",
1002 "src/x64/builtins-x64.cc",
1003 "src/x64/code-stubs-x64.cc",
1004 "src/x64/code-stubs-x64.h",
1005 "src/x64/codegen-x64.cc",
1006 "src/x64/codegen-x64.h",
1007 "src/x64/cpu-x64.cc",
1008 "src/x64/debug-x64.cc",
1009 "src/x64/deoptimizer-x64.cc",
1010 "src/x64/disasm-x64.cc",
1011 "src/x64/frames-x64.cc",
1012 "src/x64/frames-x64.h",
1013 "src/x64/full-codegen-x64.cc",
1014 "src/x64/interface-descriptors-x64.cc",
1015 "src/x64/lithium-codegen-x64.cc",
1016 "src/x64/lithium-codegen-x64.h",
1017 "src/x64/lithium-gap-resolver-x64.cc",
1018 "src/x64/lithium-gap-resolver-x64.h",
1019 "src/x64/lithium-x64.cc",
1020 "src/x64/lithium-x64.h",
1021 "src/x64/macro-assembler-x64.cc",
1022 "src/x64/macro-assembler-x64.h",
1023 "src/x64/regexp-macro-assembler-x64.cc",
1024 "src/x64/regexp-macro-assembler-x64.h",
1025 "src/compiler/x64/code-generator-x64.cc",
1026 "src/compiler/x64/instruction-codes-x64.h",
1027 "src/compiler/x64/instruction-selector-x64.cc",
1028 "src/compiler/x64/linkage-x64.cc",
1029 "src/ic/x64/access-compiler-x64.cc",
1030 "src/ic/x64/handler-compiler-x64.cc",
1031 "src/ic/x64/ic-x64.cc",
1032 "src/ic/x64/ic-compiler-x64.cc",
1033 "src/ic/x64/stub-cache-x64.cc",
1034 ]
1035 } else if (v8_target_arch == "arm") {
1036 sources += [
1037 "src/arm/assembler-arm-inl.h",
1038 "src/arm/assembler-arm.cc",
1039 "src/arm/assembler-arm.h",
1040 "src/arm/builtins-arm.cc",
1041 "src/arm/code-stubs-arm.cc",
1042 "src/arm/code-stubs-arm.h",
1043 "src/arm/codegen-arm.cc",
1044 "src/arm/codegen-arm.h",
1045 "src/arm/constants-arm.h",
1046 "src/arm/constants-arm.cc",
1047 "src/arm/cpu-arm.cc",
1048 "src/arm/debug-arm.cc",
1049 "src/arm/deoptimizer-arm.cc",
1050 "src/arm/disasm-arm.cc",
1051 "src/arm/frames-arm.cc",
1052 "src/arm/frames-arm.h",
1053 "src/arm/full-codegen-arm.cc",
1054 "src/arm/interface-descriptors-arm.cc",
1055 "src/arm/interface-descriptors-arm.h",
1056 "src/arm/lithium-arm.cc",
1057 "src/arm/lithium-arm.h",
1058 "src/arm/lithium-codegen-arm.cc",
1059 "src/arm/lithium-codegen-arm.h",
1060 "src/arm/lithium-gap-resolver-arm.cc",
1061 "src/arm/lithium-gap-resolver-arm.h",
1062 "src/arm/macro-assembler-arm.cc",
1063 "src/arm/macro-assembler-arm.h",
1064 "src/arm/regexp-macro-assembler-arm.cc",
1065 "src/arm/regexp-macro-assembler-arm.h",
1066 "src/arm/simulator-arm.cc",
1067 "src/compiler/arm/code-generator-arm.cc",
1068 "src/compiler/arm/instruction-codes-arm.h",
1069 "src/compiler/arm/instruction-selector-arm.cc",
1070 "src/compiler/arm/linkage-arm.cc",
1071 "src/ic/arm/access-compiler-arm.cc",
1072 "src/ic/arm/handler-compiler-arm.cc",
1073 "src/ic/arm/ic-arm.cc",
1074 "src/ic/arm/ic-compiler-arm.cc",
1075 "src/ic/arm/stub-cache-arm.cc",
1076 ]
1077 } else if (v8_target_arch == "arm64") {
1078 sources += [
1079 "src/arm64/assembler-arm64.cc",
1080 "src/arm64/assembler-arm64.h",
1081 "src/arm64/assembler-arm64-inl.h",
1082 "src/arm64/builtins-arm64.cc",
1083 "src/arm64/codegen-arm64.cc",
1084 "src/arm64/codegen-arm64.h",
1085 "src/arm64/code-stubs-arm64.cc",
1086 "src/arm64/code-stubs-arm64.h",
1087 "src/arm64/constants-arm64.h",
1088 "src/arm64/cpu-arm64.cc",
1089 "src/arm64/debug-arm64.cc",
1090 "src/arm64/decoder-arm64.cc",
1091 "src/arm64/decoder-arm64.h",
1092 "src/arm64/decoder-arm64-inl.h",
1093 "src/arm64/deoptimizer-arm64.cc",
1094 "src/arm64/disasm-arm64.cc",
1095 "src/arm64/disasm-arm64.h",
1096 "src/arm64/frames-arm64.cc",
1097 "src/arm64/frames-arm64.h",
1098 "src/arm64/full-codegen-arm64.cc",
1099 "src/arm64/instructions-arm64.cc",
1100 "src/arm64/instructions-arm64.h",
1101 "src/arm64/instrument-arm64.cc",
1102 "src/arm64/instrument-arm64.h",
1103 "src/arm64/interface-descriptors-arm64.cc",
1104 "src/arm64/interface-descriptors-arm64.h",
1105 "src/arm64/lithium-arm64.cc",
1106 "src/arm64/lithium-arm64.h",
1107 "src/arm64/lithium-codegen-arm64.cc",
1108 "src/arm64/lithium-codegen-arm64.h",
1109 "src/arm64/lithium-gap-resolver-arm64.cc",
1110 "src/arm64/lithium-gap-resolver-arm64.h",
1111 "src/arm64/macro-assembler-arm64.cc",
1112 "src/arm64/macro-assembler-arm64.h",
1113 "src/arm64/macro-assembler-arm64-inl.h",
1114 "src/arm64/regexp-macro-assembler-arm64.cc",
1115 "src/arm64/regexp-macro-assembler-arm64.h",
1116 "src/arm64/simulator-arm64.cc",
1117 "src/arm64/simulator-arm64.h",
1118 "src/arm64/utils-arm64.cc",
1119 "src/arm64/utils-arm64.h",
1120 "src/compiler/arm64/code-generator-arm64.cc",
1121 "src/compiler/arm64/instruction-codes-arm64.h",
1122 "src/compiler/arm64/instruction-selector-arm64.cc",
1123 "src/compiler/arm64/linkage-arm64.cc",
1124 "src/ic/arm64/access-compiler-arm64.cc",
1125 "src/ic/arm64/handler-compiler-arm64.cc",
1126 "src/ic/arm64/ic-arm64.cc",
1127 "src/ic/arm64/ic-compiler-arm64.cc",
1128 "src/ic/arm64/stub-cache-arm64.cc",
1129 ]
1130 } else if (v8_target_arch == "mipsel") {
1131 sources += [
1132 "src/mips/assembler-mips.cc",
1133 "src/mips/assembler-mips.h",
1134 "src/mips/assembler-mips-inl.h",
1135 "src/mips/builtins-mips.cc",
1136 "src/mips/codegen-mips.cc",
1137 "src/mips/codegen-mips.h",
1138 "src/mips/code-stubs-mips.cc",
1139 "src/mips/code-stubs-mips.h",
1140 "src/mips/constants-mips.cc",
1141 "src/mips/constants-mips.h",
1142 "src/mips/cpu-mips.cc",
1143 "src/mips/debug-mips.cc",
1144 "src/mips/deoptimizer-mips.cc",
1145 "src/mips/disasm-mips.cc",
1146 "src/mips/frames-mips.cc",
1147 "src/mips/frames-mips.h",
1148 "src/mips/full-codegen-mips.cc",
1149 "src/mips/interface-descriptors-mips.cc",
1150 "src/mips/lithium-codegen-mips.cc",
1151 "src/mips/lithium-codegen-mips.h",
1152 "src/mips/lithium-gap-resolver-mips.cc",
1153 "src/mips/lithium-gap-resolver-mips.h",
1154 "src/mips/lithium-mips.cc",
1155 "src/mips/lithium-mips.h",
1156 "src/mips/macro-assembler-mips.cc",
1157 "src/mips/macro-assembler-mips.h",
1158 "src/mips/regexp-macro-assembler-mips.cc",
1159 "src/mips/regexp-macro-assembler-mips.h",
1160 "src/mips/simulator-mips.cc",
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001161 "src/compiler/mips/code-generator-mips.cc",
1162 "src/compiler/mips/instruction-codes-mips.h",
1163 "src/compiler/mips/instruction-selector-mips.cc",
1164 "src/compiler/mips/linkage-mips.cc",
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001165 "src/ic/mips/access-compiler-mips.cc",
1166 "src/ic/mips/handler-compiler-mips.cc",
1167 "src/ic/mips/ic-mips.cc",
1168 "src/ic/mips/ic-compiler-mips.cc",
1169 "src/ic/mips/stub-cache-mips.cc",
1170 ]
1171 } else if (v8_target_arch == "mips64el") {
1172 sources += [
1173 "src/mips64/assembler-mips64.cc",
1174 "src/mips64/assembler-mips64.h",
1175 "src/mips64/assembler-mips64-inl.h",
1176 "src/mips64/builtins-mips64.cc",
1177 "src/mips64/codegen-mips64.cc",
1178 "src/mips64/codegen-mips64.h",
1179 "src/mips64/code-stubs-mips64.cc",
1180 "src/mips64/code-stubs-mips64.h",
1181 "src/mips64/constants-mips64.cc",
1182 "src/mips64/constants-mips64.h",
1183 "src/mips64/cpu-mips64.cc",
1184 "src/mips64/debug-mips64.cc",
1185 "src/mips64/deoptimizer-mips64.cc",
1186 "src/mips64/disasm-mips64.cc",
1187 "src/mips64/frames-mips64.cc",
1188 "src/mips64/frames-mips64.h",
1189 "src/mips64/full-codegen-mips64.cc",
1190 "src/mips64/interface-descriptors-mips64.cc",
1191 "src/mips64/lithium-codegen-mips64.cc",
1192 "src/mips64/lithium-codegen-mips64.h",
1193 "src/mips64/lithium-gap-resolver-mips64.cc",
1194 "src/mips64/lithium-gap-resolver-mips64.h",
1195 "src/mips64/lithium-mips64.cc",
1196 "src/mips64/lithium-mips64.h",
1197 "src/mips64/macro-assembler-mips64.cc",
1198 "src/mips64/macro-assembler-mips64.h",
1199 "src/mips64/regexp-macro-assembler-mips64.cc",
1200 "src/mips64/regexp-macro-assembler-mips64.h",
1201 "src/mips64/simulator-mips64.cc",
1202 "src/ic/mips64/access-compiler-mips64.cc",
1203 "src/ic/mips64/handler-compiler-mips64.cc",
1204 "src/ic/mips64/ic-mips64.cc",
1205 "src/ic/mips64/ic-compiler-mips64.cc",
1206 "src/ic/mips64/stub-cache-mips64.cc",
1207 ]
1208 }
1209
1210 configs -= [ "//build/config/compiler:chromium_code" ]
1211 configs += [ "//build/config/compiler:no_chromium_code" ]
1212 configs += [ ":internal_config", ":features", ":toolchain" ]
1213
1214 if (!is_debug) {
1215 configs -= [ "//build/config/compiler:optimize" ]
1216 configs += [ "//build/config/compiler:optimize_max" ]
1217 }
1218
1219 defines = []
1220 deps = [ ":v8_libbase" ]
1221
1222 if (is_win) {
1223 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1224 cflags = [ "/wd4267" ]
1225 }
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001226
1227 if (v8_enable_i18n_support) {
1228 deps += [ "//third_party/icu" ]
1229 if (is_win) {
1230 deps += [ "//third_party/icu:icudata" ]
1231 }
1232 # TODO(jochen): Add support for icu_use_data_file_flag
1233 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ]
1234 } else {
1235 sources -= [
1236 "src/i18n.cc",
1237 "src/i18n.h",
1238 ]
1239 }
1240
1241 if (v8_postmortem_support) {
1242 sources += [ "$target_gen_dir/debug-support.cc" ]
1243 deps += [ ":postmortem-metadata" ]
1244 }
1245}
1246
1247source_set("v8_libbase") {
1248 visibility = [ ":*" ] # Only targets in this file can depend on this.
1249
1250 sources = [
1251 "src/base/atomicops.h",
1252 "src/base/atomicops_internals_arm64_gcc.h",
1253 "src/base/atomicops_internals_arm_gcc.h",
1254 "src/base/atomicops_internals_atomicword_compat.h",
1255 "src/base/atomicops_internals_mac.h",
1256 "src/base/atomicops_internals_mips_gcc.h",
1257 "src/base/atomicops_internals_tsan.h",
1258 "src/base/atomicops_internals_x86_gcc.cc",
1259 "src/base/atomicops_internals_x86_gcc.h",
1260 "src/base/atomicops_internals_x86_msvc.h",
1261 "src/base/bits.cc",
1262 "src/base/bits.h",
1263 "src/base/build_config.h",
1264 "src/base/cpu.cc",
1265 "src/base/cpu.h",
1266 "src/base/division-by-constant.cc",
1267 "src/base/division-by-constant.h",
1268 "src/base/flags.h",
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001269 "src/base/functional.cc",
1270 "src/base/functional.h",
1271 "src/base/iterator.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001272 "src/base/lazy-instance.h",
1273 "src/base/logging.cc",
1274 "src/base/logging.h",
1275 "src/base/macros.h",
1276 "src/base/once.cc",
1277 "src/base/once.h",
1278 "src/base/platform/elapsed-timer.h",
1279 "src/base/platform/time.cc",
1280 "src/base/platform/time.h",
1281 "src/base/platform/condition-variable.cc",
1282 "src/base/platform/condition-variable.h",
1283 "src/base/platform/mutex.cc",
1284 "src/base/platform/mutex.h",
1285 "src/base/platform/platform.h",
1286 "src/base/platform/semaphore.cc",
1287 "src/base/platform/semaphore.h",
1288 "src/base/safe_conversions.h",
1289 "src/base/safe_conversions_impl.h",
1290 "src/base/safe_math.h",
1291 "src/base/safe_math_impl.h",
1292 "src/base/sys-info.cc",
1293 "src/base/sys-info.h",
1294 "src/base/utils/random-number-generator.cc",
1295 "src/base/utils/random-number-generator.h",
1296 ]
1297
1298 configs -= [ "//build/config/compiler:chromium_code" ]
1299 configs += [ "//build/config/compiler:no_chromium_code" ]
1300 configs += [ ":internal_config_base", ":features", ":toolchain" ]
1301
1302 if (!is_debug) {
1303 configs -= [ "//build/config/compiler:optimize" ]
1304 configs += [ "//build/config/compiler:optimize_max" ]
1305 }
1306
1307 defines = []
1308
1309 if (is_posix) {
1310 sources += [
1311 "src/base/platform/platform-posix.cc"
1312 ]
1313 }
1314
1315 if (is_linux) {
1316 sources += [
1317 "src/base/platform/platform-linux.cc"
1318 ]
1319
1320 libs = [ "rt" ]
1321 } else if (is_android) {
1322 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ]
1323
1324 if (build_os == "mac") {
1325 if (current_toolchain == host_toolchain) {
1326 sources += [ "src/base/platform/platform-macos.cc" ]
1327 } else {
1328 sources += [ "src/base/platform/platform-linux.cc" ]
1329 }
1330 } else {
1331 sources += [ "src/base/platform/platform-linux.cc" ]
1332 if (current_toolchain == host_toolchain) {
1333 defines += [ "V8_LIBRT_NOT_AVAILABLE" ]
1334 }
1335 }
1336 } else if (is_mac) {
1337 sources += [ "src/base/platform/platform-macos.cc" ]
1338 } else if (is_win) {
1339 # TODO(jochen): Add support for cygwin.
1340 sources += [
1341 "src/base/platform/platform-win32.cc",
1342 "src/base/win32-headers.h",
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001343 ]
1344
1345 defines += [ "_CRT_RAND_S" ] # for rand_s()
1346
1347 libs = [ "winmm.lib", "ws2_32.lib" ]
1348 }
1349
1350 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris.
1351}
1352
1353source_set("v8_libplatform") {
1354 sources = [
1355 "include/libplatform/libplatform.h",
1356 "src/libplatform/default-platform.cc",
1357 "src/libplatform/default-platform.h",
1358 "src/libplatform/task-queue.cc",
1359 "src/libplatform/task-queue.h",
1360 "src/libplatform/worker-thread.cc",
1361 "src/libplatform/worker-thread.h",
1362 ]
1363
1364 configs -= [ "//build/config/compiler:chromium_code" ]
1365 configs += [ "//build/config/compiler:no_chromium_code" ]
1366 configs += [ ":internal_config_base", ":features", ":toolchain" ]
1367
1368 if (!is_debug) {
1369 configs -= [ "//build/config/compiler:optimize" ]
1370 configs += [ "//build/config/compiler:optimize_max" ]
1371 }
1372
1373 deps = [
1374 ":v8_libbase",
1375 ]
1376}
1377
1378###############################################################################
1379# Executables
1380#
1381
1382if (current_toolchain == host_toolchain) {
1383 executable("mksnapshot") {
1384 visibility = [ ":*" ] # Only targets in this file can depend on this.
1385
1386 sources = [
1387 "src/mksnapshot.cc",
1388 ]
1389
1390 configs -= [ "//build/config/compiler:chromium_code" ]
1391 configs += [ "//build/config/compiler:no_chromium_code" ]
1392 configs += [ ":internal_config", ":features", ":toolchain" ]
1393
1394 deps = [
1395 ":v8_base",
1396 ":v8_libplatform",
1397 ":v8_nosnapshot",
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001398 "//build/config/sanitizers:deps",
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001399 ]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001400 }
1401}
1402
1403###############################################################################
1404# Public targets
1405#
1406
1407if (component_mode == "shared_library") {
1408
1409component("v8") {
1410 sources = [
1411 "src/v8dll-main.cc",
1412 ]
1413
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001414 if (v8_use_snapshot && v8_use_external_startup_data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001415 deps = [
1416 ":v8_base",
1417 ":v8_external_snapshot",
1418 ]
1419 } else if (v8_use_snapshot) {
1420 deps = [
1421 ":v8_base",
1422 ":v8_snapshot",
1423 ]
1424 } else {
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001425 assert(!v8_use_external_startup_data)
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001426 deps = [
1427 ":v8_base",
1428 ":v8_nosnapshot",
1429 ]
1430 }
1431
1432 configs -= [ "//build/config/compiler:chromium_code" ]
1433 configs += [ "//build/config/compiler:no_chromium_code" ]
1434 configs += [ ":internal_config", ":features", ":toolchain" ]
1435
1436 direct_dependent_configs = [ ":external_config" ]
1437
1438 libs = []
1439 if (is_android && current_toolchain != host_toolchain) {
1440 libs += [ "log" ]
1441 }
1442}
1443
1444} else {
1445
1446group("v8") {
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001447 if (v8_use_snapshot && v8_use_external_startup_data) {
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001448 deps = [
1449 ":v8_base",
1450 ":v8_external_snapshot",
1451 ]
1452 } else if (v8_use_snapshot) {
1453 deps = [
1454 ":v8_base",
1455 ":v8_snapshot",
1456 ]
1457 } else {
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001458 assert(!v8_use_external_startup_data)
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001459 deps = [
1460 ":v8_base",
1461 ":v8_nosnapshot",
1462 ]
1463 }
1464
1465 direct_dependent_configs = [ ":external_config" ]
1466}
1467
1468}