OLD | NEW |
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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/arm.gni") | 6 import("//build/config/arm.gni") |
7 import("//build/config/mips.gni") | 7 import("//build/config/mips.gni") |
8 | 8 |
9 # Because standalone V8 builds are not supported, assume this is part of a | 9 # Because standalone V8 builds are not supported, assume this is part of a |
10 # Chromium build. | 10 # Chromium build. |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 | 289 |
290 if (v8_use_external_startup_data) { | 290 if (v8_use_external_startup_data) { |
291 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] | 291 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] |
292 args += [ | 292 args += [ |
293 "--startup_blob", | 293 "--startup_blob", |
294 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), | 294 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), |
295 ] | 295 ] |
296 } | 296 } |
297 } | 297 } |
298 | 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 |
299 action("d8_js2c") { | 329 action("d8_js2c") { |
300 visibility = [ ":*" ] # Only targets in this file can depend on this. | 330 visibility = [ ":*" ] # Only targets in this file can depend on this. |
301 | 331 |
302 script = "tools/js2c.py" | 332 script = "tools/js2c.py" |
303 | 333 |
304 inputs = [ | 334 inputs = [ |
305 "src/d8.js", | 335 "src/d8.js", |
306 "src/macros.py", | 336 "src/macros.py", |
307 ] | 337 ] |
308 | 338 |
309 outputs = [ | 339 outputs = [ |
310 "$target_gen_dir/d8-js.cc", | 340 "$target_gen_dir/d8-js.cc", |
311 ] | 341 ] |
312 | 342 |
313 args = rebase_path(outputs, root_build_dir) + [ "D8" ] + | 343 args = rebase_path(outputs, root_build_dir) + [ "D8" ] + |
314 rebase_path(inputs, root_build_dir) | 344 rebase_path(inputs, root_build_dir) |
315 } | 345 } |
316 | 346 |
317 if (v8_use_external_startup_data) { | 347 if (v8_use_external_startup_data) { |
318 action("natives_blob") { | 348 action("natives_blob") { |
319 visibility = [ ":*" ] # Only targets in this file can depend on this. | 349 visibility = [ ":*" ] # Only targets in this file can depend on this. |
320 | 350 |
321 deps = [ | 351 deps = [ |
322 ":js2c", | 352 ":js2c", |
323 ":js2c_experimental", | 353 ":js2c_experimental", |
| 354 ":js2c_extras", |
324 ] | 355 ] |
325 | 356 |
326 sources = [ | 357 sources = [ |
327 "$target_gen_dir/libraries.bin", | 358 "$target_gen_dir/libraries.bin", |
328 "$target_gen_dir/libraries_experimental.bin", | 359 "$target_gen_dir/libraries_experimental.bin", |
| 360 "$target_gen_dir/libraries_extras.bin", |
329 ] | 361 ] |
330 | 362 |
331 outputs = [ | 363 outputs = [ |
332 "$root_out_dir/natives_blob.bin", | 364 "$root_out_dir/natives_blob.bin", |
333 ] | 365 ] |
334 | 366 |
335 script = "tools/concatenate-files.py" | 367 script = "tools/concatenate-files.py" |
336 | 368 |
337 args = rebase_path(sources + outputs, root_build_dir) | 369 args = rebase_path(sources + outputs, root_build_dir) |
338 } | 370 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 ############################################################################### | 435 ############################################################################### |
404 # Source Sets (aka static libraries) | 436 # Source Sets (aka static libraries) |
405 # | 437 # |
406 | 438 |
407 source_set("v8_nosnapshot") { | 439 source_set("v8_nosnapshot") { |
408 visibility = [ ":*" ] # Only targets in this file can depend on this. | 440 visibility = [ ":*" ] # Only targets in this file can depend on this. |
409 | 441 |
410 deps = [ | 442 deps = [ |
411 ":js2c", | 443 ":js2c", |
412 ":js2c_experimental", | 444 ":js2c_experimental", |
| 445 ":js2c_extras", |
413 ":v8_base", | 446 ":v8_base", |
414 ] | 447 ] |
415 | 448 |
416 sources = [ | 449 sources = [ |
417 "$target_gen_dir/libraries.cc", | 450 "$target_gen_dir/libraries.cc", |
418 "$target_gen_dir/experimental-libraries.cc", | 451 "$target_gen_dir/experimental-libraries.cc", |
| 452 "$target_gen_dir/extras-libraries.cc", |
419 "src/snapshot/snapshot-empty.cc", | 453 "src/snapshot/snapshot-empty.cc", |
420 ] | 454 ] |
421 | 455 |
422 configs -= [ "//build/config/compiler:chromium_code" ] | 456 configs -= [ "//build/config/compiler:chromium_code" ] |
423 configs += [ "//build/config/compiler:no_chromium_code" ] | 457 configs += [ "//build/config/compiler:no_chromium_code" ] |
424 configs += [ | 458 configs += [ |
425 ":internal_config", | 459 ":internal_config", |
426 ":features", | 460 ":features", |
427 ":toolchain", | 461 ":toolchain", |
428 ] | 462 ] |
429 } | 463 } |
430 | 464 |
431 source_set("v8_snapshot") { | 465 source_set("v8_snapshot") { |
432 # Only targets in this file and the top-level visibility target can | 466 # Only targets in this file and the top-level visibility target can |
433 # depend on this. | 467 # depend on this. |
434 visibility = [ | 468 visibility = [ |
435 ":*", | 469 ":*", |
436 "//:gn_visibility", | 470 "//:gn_visibility", |
437 ] | 471 ] |
438 | 472 |
439 deps = [ | 473 deps = [ |
440 ":js2c", | 474 ":js2c", |
441 ":js2c_experimental", | 475 ":js2c_experimental", |
| 476 ":js2c_extras", |
442 ":run_mksnapshot", | 477 ":run_mksnapshot", |
443 ":v8_base", | 478 ":v8_base", |
444 ] | 479 ] |
445 | 480 |
446 sources = [ | 481 sources = [ |
447 "$target_gen_dir/libraries.cc", | 482 "$target_gen_dir/libraries.cc", |
448 "$target_gen_dir/experimental-libraries.cc", | 483 "$target_gen_dir/experimental-libraries.cc", |
| 484 "$target_gen_dir/extras-libraries.cc", |
449 "$target_gen_dir/snapshot.cc", | 485 "$target_gen_dir/snapshot.cc", |
450 ] | 486 ] |
451 | 487 |
452 configs -= [ "//build/config/compiler:chromium_code" ] | 488 configs -= [ "//build/config/compiler:chromium_code" ] |
453 configs += [ "//build/config/compiler:no_chromium_code" ] | 489 configs += [ "//build/config/compiler:no_chromium_code" ] |
454 configs += [ | 490 configs += [ |
455 ":internal_config", | 491 ":internal_config", |
456 ":features", | 492 ":features", |
457 ":toolchain", | 493 ":toolchain", |
458 ] | 494 ] |
459 } | 495 } |
460 | 496 |
461 if (v8_use_external_startup_data) { | 497 if (v8_use_external_startup_data) { |
462 source_set("v8_external_snapshot") { | 498 source_set("v8_external_snapshot") { |
463 visibility = [ ":*" ] # Only targets in this file can depend on this. | 499 visibility = [ ":*" ] # Only targets in this file can depend on this. |
464 | 500 |
465 deps = [ | 501 deps = [ |
466 ":js2c", | 502 ":js2c", |
467 ":js2c_experimental", | 503 ":js2c_experimental", |
| 504 ":js2c_extras", |
468 ":run_mksnapshot", | 505 ":run_mksnapshot", |
469 ":v8_base", | 506 ":v8_base", |
470 ":natives_blob", | 507 ":natives_blob", |
471 ] | 508 ] |
472 | 509 |
473 sources = [ | 510 sources = [ |
474 "src/snapshot/natives-external.cc", | 511 "src/snapshot/natives-external.cc", |
475 "src/snapshot/snapshot-external.cc", | 512 "src/snapshot/snapshot-external.cc", |
476 ] | 513 ] |
477 | 514 |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 sources += [ | 1659 sources += [ |
1623 "src/d8-debug.cc", | 1660 "src/d8-debug.cc", |
1624 "$target_gen_dir/d8-js.cc", | 1661 "$target_gen_dir/d8-js.cc", |
1625 ] | 1662 ] |
1626 } | 1663 } |
1627 if (v8_enable_i18n_support) { | 1664 if (v8_enable_i18n_support) { |
1628 deps += [ "//third_party/icu" ] | 1665 deps += [ "//third_party/icu" ] |
1629 } | 1666 } |
1630 } | 1667 } |
1631 } | 1668 } |
OLD | NEW |