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

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

Issue 2493833002: GN: Don't depend on dart_bootstrap if there is a usable prebuilt sdk (Closed)
Patch Set: 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 | « runtime/observatory/BUILD.gn ('k') | tools/dart_for_gn.py » ('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 import("../../utils/invoke_dart.gni") 5 import("../../build/executable_suffix.gni")
6 import("../../build/prebuilt_dart_sdk.gni")
6 7
7 config("libdart_vm_config") { 8 config("libdart_vm_config") {
8 if (defined(is_fuchsia) && is_fuchsia) { 9 if (defined(is_fuchsia) && is_fuchsia) {
9 libs = [ "magenta" ] 10 libs = [ "magenta" ]
10 } else if (is_win) { 11 } else if (is_win) {
11 libs = [ 12 libs = [
12 "advapi32.lib", 13 "advapi32.lib",
13 "shell32.lib", 14 "shell32.lib",
14 "dbghelp.lib", 15 "dbghelp.lib",
15 ] 16 ]
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 dir = library[0] 434 dir = library[0]
434 output = target_output 435 output = target_output
435 } 436 }
436 concatenation_target_names += [ ":concatenate_${name}_patch" ] 437 concatenation_target_names += [ ":concatenate_${name}_patch" ]
437 concatenation_files += [ target_output ] 438 concatenation_files += [ target_output ]
438 } 439 }
439 440
440 # Build the patched sdk out of the concatenated patches and the special 441 # Build the patched sdk out of the concatenated patches and the special
441 # libraries. 442 # libraries.
442 action(target_name) { 443 action(target_name) {
443 deps = [ "../bin:dart_bootstrap($host_toolchain)" ] + 444 deps = concatenation_target_names
444 concatenation_target_names 445 if (!prebuilt_dart_exe_works) {
446 deps += [ "../bin:dart_bootstrap($host_toolchain)" ]
447 }
445 448
446 patches_dir = "$target_gen_dir/patches" 449 patches_dir = "$target_gen_dir/patches"
447 patched_sdk_dir = "$root_out_dir/patched_sdk" 450 patched_sdk_dir = "$root_out_dir/patched_sdk"
448 451
449 script = "../../tools/patch_sdk.py" 452 script = "../../tools/patch_sdk.py"
450 453
451 # We list all files which make up the sdk (modulo patches) and get them ba ck 454 # We list all files which make up the sdk (modulo patches) and get them ba ck
452 # as a GN list object. 455 # as a GN list object.
453 shared_sdk_sources = exec_script("../../tools/list_dart_files.py", 456 shared_sdk_sources = exec_script("../../tools/list_dart_files.py",
454 [ "../../sdk/lib" ], 457 [ "../../sdk/lib" ],
(...skipping 19 matching lines...) Expand all
474 inputs += shared_sdk_sources 477 inputs += shared_sdk_sources
475 478
476 # Add all the concatenated patch files. 479 # Add all the concatenated patch files.
477 inputs += concatenation_files 480 inputs += concatenation_files
478 481
479 outputs = [ 482 outputs = [
480 # Instead of listing all outputs we list a single well-known one. 483 # Instead of listing all outputs we list a single well-known one.
481 "${patched_sdk_dir}/lib/core/core.dart", 484 "${patched_sdk_dir}/lib/core/core.dart",
482 ] 485 ]
483 486
484 dart_out_dir = get_label_info("../bin:dart_bootstrap($host_toolchain)", 487 args = []
485 "root_out_dir") 488 if (!prebuilt_dart_exe_works) {
486 dart_bootstrap = 489 dart_out_dir = get_label_info("../bin:dart_bootstrap($host_toolchain)",
487 rebase_path("$dart_out_dir/dart_bootstrap$dart_executable_suffix") 490 "root_out_dir")
488 491 dart_bootstrap =
489 args = [ 492 rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
490 "--dart-executable", 493 args += [
491 dart_bootstrap, 494 "--dart-executable",
495 dart_bootstrap,
496 ]
497 }
498 args += [
492 "vm", 499 "vm",
493 rebase_path("../../sdk"), 500 rebase_path("../../sdk"),
494 rebase_path(patches_dir, root_build_dir), 501 rebase_path(patches_dir, root_build_dir),
495 rebase_path(patched_sdk_dir, root_build_dir), 502 rebase_path(patched_sdk_dir, root_build_dir),
496 ] 503 ]
497 } 504 }
498 } 505 }
499 506
500 generate_patched_sdk("patched_sdk") { 507 generate_patched_sdk("patched_sdk") {
501 libraries = [ 508 libraries = [
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 "lib", 550 "lib",
544 "vmservice", 551 "vmservice",
545 ], 552 ],
546 [ 553 [
547 "bin", 554 "bin",
548 "io", 555 "io",
549 ], 556 ],
550 ] 557 ]
551 } 558 }
552 } 559 }
OLDNEW
« no previous file with comments | « runtime/observatory/BUILD.gn ('k') | tools/dart_for_gn.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698