@@ -32,9 +32,14 @@ v8_toolset_for_d8 = "host"
32
32
# TODO(GYP ): For now we only support 32-bit little-endian target builds from an
33
33
# x64 Linux host. Eventually we need to support all of the host/target
34
34
# configurations v8 runs on.
35
- if (host_cpu == " x64" && host_os == " linux" &&
36
- (target_cpu == " arm" || target_cpu == " mipsel" || target_cpu == " x86" )) {
37
- snapshot_toolchain = " //build/toolchain/linux:clang_x86"
35
+ if (host_cpu == " x64" && host_os == " linux" ) {
36
+ if (target_cpu == " arm" || target_cpu == " mipsel" || target_cpu == " x86" ) {
37
+ snapshot_toolchain = " //build/toolchain/linux:clang_x86"
38
+ } else if (target_cpu == " x64" ) {
39
+ snapshot_toolchain = " //build/toolchain/linux:clang_x64"
40
+ } else {
41
+ assert (false , " Need environment for this arch" )
42
+ }
38
43
} else {
39
44
snapshot_toolchain = default_toolchain
40
45
}
@@ -196,6 +201,8 @@ action("js2c") {
196
201
inputs = [ " tools/jsmin.py" ]
197
202
198
203
sources = [
204
+ " src/macros.py" ,
205
+ " src/messages.h" ,
199
206
" src/runtime.js" ,
200
207
" src/v8natives.js" ,
201
208
" src/symbol.js" ,
@@ -222,7 +229,6 @@ action("js2c") {
222
229
" src/mirror-debugger.js" ,
223
230
" src/liveedit-debugger.js" ,
224
231
" src/templates.js" ,
225
- " src/macros.py" ,
226
232
]
227
233
228
234
outputs = [
@@ -258,14 +264,17 @@ action("js2c_experimental") {
258
264
259
265
sources = [
260
266
" src/macros.py" ,
267
+ " src/messages.h" ,
261
268
" src/proxy.js" ,
262
269
" src/generator.js" ,
263
270
" src/harmony-array.js" ,
264
271
" src/harmony-array-includes.js" ,
265
272
" src/harmony-typedarray.js" ,
266
273
" src/harmony-tostring.js" ,
267
274
" src/harmony-regexp.js" ,
268
- " src/harmony-reflect.js"
275
+ " src/harmony-reflect.js" ,
276
+ " src/harmony-spread.js" ,
277
+ " src/harmony-object.js"
269
278
]
270
279
271
280
outputs = [
@@ -287,6 +296,36 @@ action("js2c_experimental") {
287
296
}
288
297
}
289
298
299
+ action (" js2c_extras" ) {
300
+ visibility = [ " :*" ] # Only targets in this file can depend on this.
301
+
302
+ script = " tools/js2c.py"
303
+
304
+ # The script depends on this other script, this rule causes a rebuild if it
305
+ # changes.
306
+ inputs = [ " tools/jsmin.py" ]
307
+
308
+ sources = v8_extra_library_files
309
+
310
+ outputs = [
311
+ " $target_gen_dir /extras-libraries.cc" ,
312
+ ]
313
+
314
+ args = [
315
+ rebase_path (" $target_gen_dir /extras-libraries.cc" ,
316
+ root_build_dir ),
317
+ " EXTRAS" ,
318
+ ] + rebase_path (sources , root_build_dir )
319
+
320
+ if (v8_use_external_startup_data ) {
321
+ outputs += [ " $target_gen_dir /libraries_extras.bin" ]
322
+ args += [
323
+ " --startup_blob" ,
324
+ rebase_path (" $target_gen_dir /libraries_extras.bin" , root_build_dir ),
325
+ ]
326
+ }
327
+ }
328
+
290
329
action (" d8_js2c" ) {
291
330
visibility = [ " :*" ] # Only targets in this file can depend on this.
292
331
@@ -312,11 +351,13 @@ if (v8_use_external_startup_data) {
312
351
deps = [
313
352
" :js2c" ,
314
353
" :js2c_experimental" ,
354
+ " :js2c_extras" ,
315
355
]
316
356
317
357
sources = [
318
358
" $target_gen_dir /libraries.bin" ,
319
359
" $target_gen_dir /libraries_experimental.bin" ,
360
+ " $target_gen_dir /libraries_extras.bin" ,
320
361
]
321
362
322
363
outputs = [
@@ -330,7 +371,12 @@ if (v8_use_external_startup_data) {
330
371
}
331
372
332
373
action (" postmortem-metadata" ) {
333
- visibility = [ " :*" ] # Only targets in this file can depend on this.
374
+ # Only targets in this file and the top-level visibility target can
375
+ # depend on this.
376
+ visibility = [
377
+ " :*" ,
378
+ " //:gn_visibility" ,
379
+ ]
334
380
335
381
script = " tools/gen-postmortem-metadata.py"
336
382
@@ -396,12 +442,14 @@ source_set("v8_nosnapshot") {
396
442
deps = [
397
443
" :js2c" ,
398
444
" :js2c_experimental" ,
445
+ " :js2c_extras" ,
399
446
" :v8_base" ,
400
447
]
401
448
402
449
sources = [
403
450
" $target_gen_dir /libraries.cc" ,
404
451
" $target_gen_dir /experimental-libraries.cc" ,
452
+ " $target_gen_dir /extras-libraries.cc" ,
405
453
" src/snapshot/snapshot-empty.cc" ,
406
454
]
407
455
@@ -415,18 +463,25 @@ source_set("v8_nosnapshot") {
415
463
}
416
464
417
465
source_set (" v8_snapshot" ) {
418
- visibility = [ " :*" ] # Only targets in this file can depend on this.
466
+ # Only targets in this file and the top-level visibility target can
467
+ # depend on this.
468
+ visibility = [
469
+ " :*" ,
470
+ " //:gn_visibility" ,
471
+ ]
419
472
420
473
deps = [
421
474
" :js2c" ,
422
475
" :js2c_experimental" ,
476
+ " :js2c_extras" ,
423
477
" :run_mksnapshot" ,
424
478
" :v8_base" ,
425
479
]
426
480
427
481
sources = [
428
482
" $target_gen_dir /libraries.cc" ,
429
483
" $target_gen_dir /experimental-libraries.cc" ,
484
+ " $target_gen_dir /extras-libraries.cc" ,
430
485
" $target_gen_dir /snapshot.cc" ,
431
486
]
432
487
@@ -446,6 +501,7 @@ if (v8_use_external_startup_data) {
446
501
deps = [
447
502
" :js2c" ,
448
503
" :js2c_experimental" ,
504
+ " :js2c_extras" ,
449
505
" :run_mksnapshot" ,
450
506
" :v8_base" ,
451
507
" :natives_blob" ,
@@ -530,6 +586,8 @@ source_set("v8_base") {
530
586
" src/codegen.h" ,
531
587
" src/compilation-cache.cc" ,
532
588
" src/compilation-cache.h" ,
589
+ " src/compilation-dependencies.cc" ,
590
+ " src/compilation-dependencies.h" ,
533
591
" src/compilation-statistics.cc" ,
534
592
" src/compilation-statistics.h" ,
535
593
" src/compiler/access-builder.cc" ,
@@ -555,13 +613,18 @@ source_set("v8_base") {
555
613
" src/compiler/common-operator.h" ,
556
614
" src/compiler/control-builders.cc" ,
557
615
" src/compiler/control-builders.h" ,
616
+ " src/compiler/control-equivalence.cc" ,
558
617
" src/compiler/control-equivalence.h" ,
559
618
" src/compiler/control-flow-optimizer.cc" ,
560
619
" src/compiler/control-flow-optimizer.h" ,
561
620
" src/compiler/control-reducer.cc" ,
562
621
" src/compiler/control-reducer.h" ,
563
622
" src/compiler/diamond.h" ,
564
623
" src/compiler/frame.h" ,
624
+ " src/compiler/frame-elider.cc" ,
625
+ " src/compiler/frame-elider.h" ,
626
+ " src/compiler/frame-states.cc" ,
627
+ " src/compiler/frame-states.h" ,
565
628
" src/compiler/gap-resolver.cc" ,
566
629
" src/compiler/gap-resolver.h" ,
567
630
" src/compiler/graph-builder.h" ,
@@ -665,6 +728,8 @@ source_set("v8_base") {
665
728
" src/compiler/source-position.h" ,
666
729
" src/compiler/state-values-utils.cc" ,
667
730
" src/compiler/state-values-utils.h" ,
731
+ " src/compiler/tail-call-optimization.cc" ,
732
+ " src/compiler/tail-call-optimization.h" ,
668
733
" src/compiler/typer.cc" ,
669
734
" src/compiler/typer.h" ,
670
735
" src/compiler/value-numbering-reducer.cc" ,
@@ -758,6 +823,8 @@ source_set("v8_base") {
758
823
" src/heap/heap-inl.h" ,
759
824
" src/heap/heap.cc" ,
760
825
" src/heap/heap.h" ,
826
+ " src/heap/identity-map.cc" ,
827
+ " src/heap/identity-map.h" ,
761
828
" src/heap/incremental-marking.cc" ,
762
829
" src/heap/incremental-marking.h" ,
763
830
" src/heap/mark-compact-inl.h" ,
@@ -887,8 +954,8 @@ source_set("v8_base") {
887
954
" src/objects-printer.cc" ,
888
955
" src/objects.cc" ,
889
956
" src/objects.h" ,
890
- " src/optimizing-compiler-thread .cc" ,
891
- " src/optimizing-compiler-thread .h" ,
957
+ " src/optimizing-compile-dispatcher .cc" ,
958
+ " src/optimizing-compile-dispatcher .h" ,
892
959
" src/ostreams.cc" ,
893
960
" src/ostreams.h" ,
894
961
" src/parser.cc" ,
@@ -964,6 +1031,7 @@ source_set("v8_base") {
964
1031
" src/scopeinfo.h" ,
965
1032
" src/scopes.cc" ,
966
1033
" src/scopes.h" ,
1034
+ " src/signature.h" ,
967
1035
" src/small-pointer-list.h" ,
968
1036
" src/smart-pointers.h" ,
969
1037
" src/snapshot/natives.h" ,
@@ -1006,7 +1074,6 @@ source_set("v8_base") {
1006
1074
" src/unicode-decoder.cc" ,
1007
1075
" src/unicode-decoder.h" ,
1008
1076
" src/unique.h" ,
1009
- " src/utils-inl.h" ,
1010
1077
" src/utils.cc" ,
1011
1078
" src/utils.h" ,
1012
1079
" src/v8.cc" ,
@@ -1325,6 +1392,7 @@ source_set("v8_libbase") {
1325
1392
visibility = [ " :*" ] # Only targets in this file can depend on this.
1326
1393
1327
1394
sources = [
1395
+ " src/base/adapters.h" ,
1328
1396
" src/base/atomicops.h" ,
1329
1397
" src/base/atomicops_internals_arm64_gcc.h" ,
1330
1398
" src/base/atomicops_internals_arm_gcc.h" ,
@@ -1398,17 +1466,15 @@ source_set("v8_libbase") {
1398
1466
} else if (is_android ) {
1399
1467
defines += [ " CAN_USE_VFP_INSTRUCTIONS" ]
1400
1468
1401
- if (host_os == " mac" ) {
1402
- if (current_toolchain == host_toolchain ) {
1469
+ if (current_toolchain == host_toolchain ) {
1470
+ libs = [ " dl" , " rt" ]
1471
+ if (host_os == " mac" ) {
1403
1472
sources += [ " src/base/platform/platform-macos.cc" ]
1404
1473
} else {
1405
1474
sources += [ " src/base/platform/platform-linux.cc" ]
1406
1475
}
1407
1476
} else {
1408
1477
sources += [ " src/base/platform/platform-linux.cc" ]
1409
- if (current_toolchain == host_toolchain ) {
1410
- defines += [ " V8_LIBRT_NOT_AVAILABLE" ]
1411
- }
1412
1478
}
1413
1479
} else if (is_mac ) {
1414
1480
sources += [ " src/base/platform/platform-macos.cc" ]
@@ -1524,7 +1590,7 @@ if (component_mode == "shared_library") {
1524
1590
" :toolchain" ,
1525
1591
]
1526
1592
1527
- direct_dependent_configs = [ " :external_config" ]
1593
+ public_configs = [ " :external_config" ]
1528
1594
1529
1595
libs = []
1530
1596
if (is_android && current_toolchain != host_toolchain ) {
@@ -1551,7 +1617,7 @@ if (component_mode == "shared_library") {
1551
1617
]
1552
1618
}
1553
1619
1554
- direct_dependent_configs = [ " :external_config" ]
1620
+ public_configs = [ " :external_config" ]
1555
1621
}
1556
1622
}
1557
1623
@@ -1568,7 +1634,10 @@ if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
1568
1634
configs -= [ " //build/config/compiler:chromium_code" ]
1569
1635
configs += [ " //build/config/compiler:no_chromium_code" ]
1570
1636
configs += [
1571
- " :internal_config" ,
1637
+ # Note: don't use :internal_config here because this target will get
1638
+ # the :external_config applied to it by virtue of depending on :v8, and
1639
+ # you can't have both applied to the same target.
1640
+ " :internal_config_base" ,
1572
1641
" :features" ,
1573
1642
" :toolchain" ,
1574
1643
]
0 commit comments