| 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("//build/compiled_action.gni") | 5 import("//build/compiled_action.gni") |
| 6 import("../application_snapshot.gni") | 6 import("../application_snapshot.gni") |
| 7 | 7 |
| 8 group("dartanalyzer") { | 8 group("dartanalyzer") { |
| 9 deps = [ | 9 deps = [ |
| 10 ":generate_dartanalyzer_snapshot", | 10 ":generate_dartanalyzer_snapshot", |
| 11 ":generate_summary_spec", | 11 ":generate_summary_spec", |
| 12 ":generate_summary_strong", | 12 ":generate_summary_strong", |
| 13 ] | 13 ] |
| 14 } | 14 } |
| 15 | 15 |
| 16 analyzer_files = exec_script("../../tools/list_dart_files.py", | 16 analyzer_files = exec_script("../../tools/list_dart_files.py", |
| 17 [ rebase_path("../../pkg/analyzer") ], | 17 [ "absolute", rebase_path("../../pkg/analyzer") ], |
| 18 "list lines") | 18 "list lines") |
| 19 | 19 |
| 20 application_snapshot("generate_dartanalyzer_snapshot") { | 20 application_snapshot("generate_dartanalyzer_snapshot") { |
| 21 main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart" | 21 main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart" |
| 22 training_args = [ | 22 training_args = [ |
| 23 "--dart-sdk=" + rebase_path("../../sdk"), | 23 "--dart-sdk=" + rebase_path("../../sdk"), |
| 24 rebase_path("../../tests/language/first_test.dart"), | 24 rebase_path("../../tests/language/first_test.dart"), |
| 25 ] | 25 ] |
| 26 name = "dartanalyzer" | 26 name = "dartanalyzer" |
| 27 cli_files = exec_script("../../tools/list_dart_files.py", | 27 cli_files = exec_script("../../tools/list_dart_files.py", |
| 28 [ rebase_path("../../pkg/analyzer_cli") ], | 28 [ "absolute", rebase_path("../../pkg/analyzer_cli") ], |
| 29 "list lines") | 29 "list lines") |
| 30 inputs = cli_files + analyzer_files | 30 inputs = cli_files + analyzer_files |
| 31 } | 31 } |
| 32 | 32 |
| 33 sdk_lib_files = exec_script("../../tools/list_dart_files.py", | 33 sdk_lib_files = exec_script("../../tools/list_dart_files.py", |
| 34 [ rebase_path("../../sdk/lib") ], | 34 [ "absolute", rebase_path("../../sdk/lib") ], |
| 35 "list lines") | 35 "list lines") |
| 36 | 36 |
| 37 template("generate_summary") { | 37 template("generate_summary") { |
| 38 assert(defined(invoker.type), "Must specify the summary type") | 38 assert(defined(invoker.type), "Must specify the summary type") |
| 39 type = invoker.type | 39 type = invoker.type |
| 40 assert(type == "spec" || type == "strong") | 40 assert(type == "spec" || type == "strong") |
| 41 compiled_action(target_name) { | 41 compiled_action(target_name) { |
| 42 tool = "../../runtime/bin:dart" | 42 tool = "../../runtime/bin:dart" |
| 43 inputs = sdk_lib_files + analyzer_files | 43 inputs = sdk_lib_files + analyzer_files |
| 44 | 44 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 generate_summary("generate_summary_spec") { | 65 generate_summary("generate_summary_spec") { |
| 66 type = "spec" | 66 type = "spec" |
| 67 } | 67 } |
| 68 | 68 |
| 69 generate_summary("generate_summary_strong") { | 69 generate_summary("generate_summary_strong") { |
| 70 type = "strong" | 70 type = "strong" |
| 71 } | 71 } |
| OLD | NEW |