| OLD | NEW |
| 1 # Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2016, 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("../invoke_dart.gni") | 5 import("../invoke_dart.gni") |
| 6 | 6 |
| 7 group("dartanalyzer") { | 7 group("dartanalyzer") { |
| 8 deps = [ | 8 deps = [ |
| 9 ":generate_dartanalyzer_snapshot", | 9 ":generate_dartanalyzer_snapshot", |
| 10 ":generate_summary_spec", | 10 ":generate_summary_spec", |
| 11 ":generate_summary_strong", | 11 ":generate_summary_strong", |
| 12 ] | 12 ] |
| 13 } | 13 } |
| 14 | 14 |
| 15 analyzer_files = exec_script("../../tools/list_dart_files.py", | 15 analyzer_files = exec_script("../../tools/list_dart_files.py", |
| 16 [rebase_path("../../pkg/analyzer")], | 16 [ rebase_path("../../pkg/analyzer") ], |
| 17 "list lines") | 17 "list lines") |
| 18 | 18 |
| 19 application_snapshot("generate_dartanalyzer_snapshot") { | 19 application_snapshot("generate_dartanalyzer_snapshot") { |
| 20 main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart" | 20 main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart" |
| 21 training_args = [ | 21 training_args = [ |
| 22 "--dart-sdk=" + rebase_path("../../sdk"), | 22 "--dart-sdk=" + rebase_path("../../sdk"), |
| 23 rebase_path("../../tests/language/first_test.dart") | 23 rebase_path("../../tests/language/first_test.dart"), |
| 24 ] | 24 ] |
| 25 name = "dartanalyzer" | 25 name = "dartanalyzer" |
| 26 cli_files = exec_script("../../tools/list_dart_files.py", | 26 cli_files = exec_script("../../tools/list_dart_files.py", |
| 27 [rebase_path("../../pkg/analyzer_cli")], | 27 [ rebase_path("../../pkg/analyzer_cli") ], |
| 28 "list lines") | 28 "list lines") |
| 29 inputs = cli_files + analyzer_files | 29 inputs = cli_files + analyzer_files |
| 30 } | 30 } |
| 31 | 31 |
| 32 sdk_lib_files = exec_script("../../tools/list_dart_files.py", | 32 sdk_lib_files = exec_script("../../tools/list_dart_files.py", |
| 33 [rebase_path("../../sdk/lib")], | 33 [ rebase_path("../../sdk/lib") ], |
| 34 "list lines") | 34 "list lines") |
| 35 | 35 |
| 36 template("generate_summary") { | 36 template("generate_summary") { |
| 37 assert(defined(invoker.type), "Must specify the summary type") | 37 assert(defined(invoker.type), "Must specify the summary type") |
| 38 type = invoker.type | 38 type = invoker.type |
| 39 assert((type == "spec") || (type == "strong")) | 39 assert(type == "spec" || type == "strong") |
| 40 invoke_dart(target_name) { | 40 invoke_dart(target_name) { |
| 41 inputs = sdk_lib_files + analyzer_files | 41 inputs = sdk_lib_files + analyzer_files |
| 42 | 42 |
| 43 output = "$root_gen_dir/$type.sum" | 43 output = "$root_gen_dir/$type.sum" |
| 44 outputs = [ | 44 outputs = [ |
| 45 output | 45 output, |
| 46 ] | 46 ] |
| 47 | 47 |
| 48 dot_packages = rebase_path("../../.packages") | 48 dot_packages = rebase_path("../../.packages") |
| 49 build_sdk_summaries = | 49 build_sdk_summaries = |
| 50 rebase_path("../../pkg/analyzer/tool/summary/build_sdk_summaries.dart") | 50 rebase_path("../../pkg/analyzer/tool/summary/build_sdk_summaries.dart") |
| 51 abs_output = rebase_path(output) | 51 abs_output = rebase_path(output) |
| 52 | 52 |
| 53 args = [ | 53 args = [ |
| 54 "--packages=$dot_packages", | 54 "--packages=$dot_packages", |
| 55 build_sdk_summaries, | 55 build_sdk_summaries, |
| 56 "build-$type", | 56 "build-$type", |
| 57 abs_output, | 57 abs_output, |
| 58 rebase_path("../../sdk"), | 58 rebase_path("../../sdk"), |
| 59 ] | 59 ] |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 generate_summary("generate_summary_spec") { | 63 generate_summary("generate_summary_spec") { |
| 64 type = "spec" | 64 type = "spec" |
| 65 } | 65 } |
| 66 | 66 |
| 67 generate_summary("generate_summary_strong") { | 67 generate_summary("generate_summary_strong") { |
| 68 type = "strong" | 68 type = "strong" |
| 69 } | 69 } |
| OLD | NEW |