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

Side by Side Diff: runtime/vm/BUILD.gn

Issue 2469683002: Emit patched_sdk in the root output directory. (Closed)
Patch Set: Martin's comment Created 4 years, 1 month 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 | runtime/vm/vm.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 config("libdart_vm_config") { 5 config("libdart_vm_config") {
6 if (defined(is_fuchsia) && is_fuchsia) { 6 if (defined(is_fuchsia) && is_fuchsia) {
7 libs = [ "magenta" ] 7 libs = [ "magenta" ]
8 } else if (is_win) { 8 } else if (is_win) {
9 libs = [ 9 libs = [
10 "advapi32.lib", 10 "advapi32.lib",
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 script = "../tools/concatenate_patches.py" 408 script = "../tools/concatenate_patches.py"
409 args = [ 409 args = [
410 "--output", 410 "--output",
411 rebase_path(output, root_build_dir), 411 rebase_path(output, root_build_dir),
412 ] 412 ]
413 inputs = [] 413 inputs = []
414 } 414 }
415 } 415 }
416 416
417 if (!defined(is_fuchsia) || !is_fuchsia) { 417 if (!defined(is_fuchsia) || !is_fuchsia) {
418 template("generate_patched_sdk") {
419 assert(defined(invoker.libraries), "Need libraries in $target_name")
418 420
419 template("generate_patched_sdk") { 421 concatenation_target_names = []
420 assert(defined(invoker.libraries), "Need libraries in $target_name") 422 concatenation_files = []
421 423
422 concatenation_target_names = [] 424 # Concatenate vm library patches.
423 concatenation_files = [] 425 foreach(library, invoker.libraries) {
426 name = library[1]
424 427
425 # Concatenate vm library patches. 428 target_output = "$target_gen_dir/patches/${name}_patch.dart"
426 foreach(library, invoker.libraries) { 429 concatenate_patch("concatenate_${name}_patch") {
427 name = library[1] 430 libname = name
431 dir = library[0]
432 output = target_output
433 }
434 concatenation_target_names += [ ":concatenate_${name}_patch" ]
435 concatenation_files += [ target_output ]
436 }
428 437
429 target_output = "$target_gen_dir/patches/${name}_patch.dart" 438 # Build the patched sdk out of the concatenated patches and the special
430 concatenate_patch("concatenate_${name}_patch") { 439 # libraries.
431 libname = name 440 action(target_name) {
432 dir = library[0] 441 deps = concatenation_target_names
433 output = target_output 442
443 patches_dir = "$target_gen_dir/patches"
444 patched_sdk_dir = "$root_out_dir/patched_sdk"
445
446 script = "../../tools/patch_sdk.py"
447
448 # We list all files which make up the sdk (modulo patches) and get them ba ck
449 # as a GN list object.
450 shared_sdk_sources = exec_script("../../tools/list_dart_files.py",
451 [ "../../sdk/lib" ],
452 "list lines")
453
454 # We list the `patch_sdk.dart` tool here because the [script] (which is
455 # implicitly an input) will call it.
456 inputs = [
457 "../../tools/patch_sdk.dart",
458 ]
459
460 # Files below are not patches, they will not be in [concatenation_files] b ut
461 # the `patch_sdk.dart` script will copy them into the patched sdk.
462 inputs += [
463 "../lib/typed_data.dart",
464 "../bin/builtin.dart",
465 "../bin/vmservice/vmservice_io.dart",
466 "../bin/vmservice/loader.dart",
467 "../bin/vmservice/server.dart",
468 ]
469
470 # Add all the normal sdk sources.
471 inputs += shared_sdk_sources
472
473 # Add all the concatenated patch files.
474 inputs += concatenation_files
475
476 outputs = [
477 # Instead of listing all outputs we list a single well-known one.
478 "${patched_sdk_dir}/lib/core/core.dart",
479 ]
480
481 args = [
482 "vm",
483 rebase_path("../../sdk"),
484 rebase_path(patches_dir, root_build_dir),
485 rebase_path(patched_sdk_dir, root_build_dir),
486 ]
434 } 487 }
435 concatenation_target_names += [ ":concatenate_${name}_patch" ]
436 concatenation_files += [ target_output ]
437 } 488 }
438 489
439 # Build the patched sdk out of the concatenated patches and the special 490 generate_patched_sdk("patched_sdk") {
440 # libraries. 491 libraries = [
441 action(target_name) { 492 [
442 deps = concatenation_target_names 493 "lib",
443 494 "async",
444 patches_dir = "$target_gen_dir/patches" 495 ],
445 patched_sdk_dir = "$target_gen_dir/patched_sdk" 496 [
446 497 "lib",
447 script = "../../tools/patch_sdk.py" 498 "collection",
448 499 ],
449 # We list all files which make up the sdk (modulo patches) and get them back 500 [
450 # as a GN list object. 501 "lib",
451 shared_sdk_sources = exec_script("../../tools/list_dart_files.py", 502 "convert",
452 [ "../../sdk/lib" ], 503 ],
453 "list lines") 504 [
454 505 "lib",
455 # We list the `patch_sdk.dart` tool here because the [script] (which is 506 "core",
456 # implicitly an input) will call it. 507 ],
457 inputs = [ 508 [
458 "../../tools/patch_sdk.dart", 509 "lib",
459 ] 510 "developer",
460 511 ],
461 # Files below are not patches, they will not be in [concatenation_files] but 512 [
462 # the `patch_sdk.dart` script will copy them into the patched sdk. 513 "lib",
463 inputs += [ 514 "internal",
464 "../lib/typed_data.dart", 515 ],
465 "../bin/builtin.dart", 516 [
466 "../bin/vmservice/vmservice_io.dart", 517 "lib",
467 "../bin/vmservice/loader.dart", 518 "isolate",
468 "../bin/vmservice/server.dart", 519 ],
469 ] 520 [
470 521 "lib",
471 # Add all the normal sdk sources. 522 "math",
472 inputs += shared_sdk_sources 523 ],
473 524 [
474 # Add all the concatenated patch files. 525 "lib",
475 inputs += concatenation_files 526 "mirrors",
476 527 ],
477 outputs = [ 528 [
478 # Instead of listing all outputs we list a single well-known one. 529 "lib",
479 "${patched_sdk_dir}/lib/core/core.dart", 530 "profiler",
480 ] 531 ],
481 532 [
482 args = [ 533 "lib",
483 "vm", 534 "vmservice",
484 rebase_path("../../sdk"), 535 ],
485 rebase_path(patches_dir, root_build_dir), 536 [
486 rebase_path(patched_sdk_dir, root_build_dir), 537 "bin",
538 "io",
539 ],
487 ] 540 ]
488 } 541 }
489 } 542 }
490
491 generate_patched_sdk("patched_sdk") {
492 libraries = [
493 [
494 "lib",
495 "async",
496 ],
497 [
498 "lib",
499 "collection",
500 ],
501 [
502 "lib",
503 "convert",
504 ],
505 [
506 "lib",
507 "core",
508 ],
509 [
510 "lib",
511 "developer",
512 ],
513 [
514 "lib",
515 "internal",
516 ],
517 [
518 "lib",
519 "isolate",
520 ],
521 [
522 "lib",
523 "math",
524 ],
525 [
526 "lib",
527 "mirrors",
528 ],
529 [
530 "lib",
531 "profiler",
532 ],
533 [
534 "lib",
535 "vmservice",
536 ],
537 [
538 "bin",
539 "io",
540 ],
541 ]
542 }
543
544 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/vm.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698