| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 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 |
| 3 | # BSD-style license that can be found in the LICENSE file. |
| 4 | |
| Zach Anderson | 4877587 | 2018-05-03 21:07:13 | [diff] [blame] | 5 | import("build/dart/dart_host_sdk_toolchain.gni") |
| Zachary Anderson | a99cdab | 2017-11-02 19:02:18 | [diff] [blame] | 6 | |
| James Robinson | 138d587 | 2018-01-18 06:05:56 | [diff] [blame] | 7 | targetting_fuchsia = target_os == "fuchsia" |
| 8 | |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 9 | # This target will be built if no target is specified when invoking ninja. |
| 10 | group("default") { |
| James Robinson | 138d587 | 2018-01-18 06:05:56 | [diff] [blame] | 11 | if (targetting_fuchsia) { |
| Zachary Anderson | 7f55ad8 | 2016-12-13 21:02:52 | [diff] [blame] | 12 | # Fuchsia has run_vm_tests marked testonly. |
| 13 | testonly = true |
| 14 | } |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 15 | deps = [ |
| asiva | bc7220a | 2018-06-18 22:31:32 | [diff] [blame] | 16 | ":runtime", |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 17 | ] |
| 18 | } |
| 19 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 20 | group("most") { |
| James Robinson | 138d587 | 2018-01-18 06:05:56 | [diff] [blame] | 21 | if (targetting_fuchsia) { |
| Zachary Anderson | 7f55ad8 | 2016-12-13 21:02:52 | [diff] [blame] | 22 | # Fuchsia has run_vm_tests marked testonly. |
| 23 | testonly = true |
| 24 | } |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 25 | deps = [ |
| 26 | ":analysis_server", |
| 27 | ":create_sdk", |
| 28 | ":dart2js", |
| 29 | ":dartanalyzer", |
| 30 | ":dartdevc", |
| 31 | ":runtime", |
| 32 | ":samples", |
| 33 | ] |
| 34 | } |
| 35 | |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 36 | group("runtime") { |
| asiva | bc7220a | 2018-06-18 22:31:32 | [diff] [blame] | 37 | import("runtime/runtime_args.gni") |
| 38 | |
| 39 | target_supports_aot = dart_target_arch == "arm" || |
| 40 | dart_target_arch == "arm64" || dart_target_arch == "x64" |
| 41 | |
| James Robinson | 138d587 | 2018-01-18 06:05:56 | [diff] [blame] | 42 | if (targetting_fuchsia) { |
| Zachary Anderson | 7f55ad8 | 2016-12-13 21:02:52 | [diff] [blame] | 43 | # Fuchsia has run_vm_tests marked testonly. |
| 44 | testonly = true |
| 45 | } |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 46 | deps = [ |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 47 | "runtime/bin:dart", |
| Zachary Anderson | 02eebb0 | 2017-11-01 21:13:28 | [diff] [blame] | 48 | "runtime/bin:dart_bootstrap($host_toolchain)", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 49 | "runtime/bin:process_test", |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 50 | "runtime/bin:run_vm_tests", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 51 | "runtime/bin:sample_extension", |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 52 | "runtime/bin:test_extension", |
| Zachary Anderson | 02eebb0 | 2017-11-01 21:13:28 | [diff] [blame] | 53 | "runtime/vm:kernel_platform_files($host_toolchain)", |
| Ryan Macnak | 9eb216a | 2017-01-31 17:47:51 | [diff] [blame] | 54 | |
| Martin Kustermann | 7541479 | 2017-03-02 15:04:30 | [diff] [blame] | 55 | # TODO(rmacnak): Link this into 'dart'. |
| Siva Chandra | 4b73d12 | 2018-01-12 20:40:41 | [diff] [blame] | 56 | "utils/kernel-service:copy_kernel_service_snapshot", |
| Ryan Macnak | 9eb216a | 2017-01-31 17:47:51 | [diff] [blame] | 57 | "utils/kernel-service:kernel-service", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 58 | ] |
| Vyacheslav Egorov | 37f56d6 | 2018-02-26 17:08:47 | [diff] [blame] | 59 | |
| 60 | if (target_supports_aot) { |
| Zach Anderson | 9847c06 | 2018-06-04 21:35:39 | [diff] [blame] | 61 | deps += [ "runtime/bin:precompiler_entry_points_json" ] |
| Vyacheslav Egorov | 37f56d6 | 2018-02-26 17:08:47 | [diff] [blame] | 62 | } |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 63 | } |
| 64 | |
| asiva | bc7220a | 2018-06-18 22:31:32 | [diff] [blame] | 65 | group("runtime_kernel") { |
| Zach Anderson | 876ce43 | 2018-07-10 17:32:43 | [diff] [blame] | 66 | if (targetting_fuchsia) { |
| 67 | # Fuchsia has run_vm_tests marked testonly. |
| 68 | testonly = true |
| 69 | } |
| asiva | bc7220a | 2018-06-18 22:31:32 | [diff] [blame] | 70 | deps = [ |
| 71 | ":runtime", |
| 72 | ] |
| 73 | } |
| 74 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 75 | group("runtime_precompiled") { |
| 76 | deps = [ |
| Zachary Anderson | 02eebb0 | 2017-11-01 21:13:28 | [diff] [blame] | 77 | "runtime/bin:dart_bootstrap($host_toolchain)", |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 78 | "runtime/bin:dart_precompiled_runtime", |
| Florian Schneider | c7aba7d | 2017-01-10 00:58:09 | [diff] [blame] | 79 | "runtime/bin:process_test", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 80 | ] |
| 81 | } |
| 82 | |
| Zachary Anderson | b6bb297 | 2017-04-19 16:00:12 | [diff] [blame] | 83 | group("create_sdk") { |
| Ryan Macnak | db87545 | 2018-04-24 16:03:45 | [diff] [blame] | 84 | public_deps = [ |
| Zachary Anderson | b6bb297 | 2017-04-19 16:00:12 | [diff] [blame] | 85 | "sdk:create_sdk", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 86 | ] |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 87 | } |
| 88 | |
| P.Y. Laligand | ab25f54 | 2017-11-06 19:06:18 | [diff] [blame] | 89 | if (defined(dart_host_sdk_toolchain) && |
| 90 | dart_host_sdk_toolchain != host_toolchain) { |
| Zachary Anderson | a99cdab | 2017-11-02 19:02:18 | [diff] [blame] | 91 | group("create_host_sdk") { |
| 92 | deps = [ |
| 93 | "sdk:create_sdk($dart_host_sdk_toolchain)", |
| 94 | ] |
| 95 | } |
| 96 | } |
| 97 | |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 98 | group("dart2js") { |
| 99 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 100 | "utils/compiler:dart2js", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 101 | ] |
| 102 | } |
| 103 | |
| 104 | group("dartanalyzer") { |
| 105 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 106 | "utils/dartanalyzer", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 107 | ] |
| 108 | } |
| 109 | |
| 110 | group("dartdevc") { |
| 111 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 112 | "utils/dartdevc", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 113 | ] |
| 114 | } |
| 115 | |
| 116 | group("dartfmt") { |
| 117 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 118 | "utils/dartfmt", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 119 | ] |
| 120 | } |
| 121 | |
| 122 | group("analysis_server") { |
| 123 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 124 | "utils/analysis_server", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 125 | ] |
| 126 | } |
| 127 | |
| 128 | # This is the target that is built on the dart2js build bots. |
| 129 | # It must depend on anything that is required by the dart2js |
| 130 | # test suites. |
| 131 | group("dart2js_bot") { |
| 132 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 133 | ":create_sdk", |
| Zachary Anderson | 7c784ce | 2016-09-29 20:23:00 | [diff] [blame] | 134 | ] |
| 135 | } |
| 136 | |
| 137 | group("samples") { |
| 138 | deps = [ |
| Zachary Anderson | c1313a5 | 2016-10-26 15:50:54 | [diff] [blame] | 139 | "runtime/bin:sample_extension", |
| Zachary Anderson | 7e1b7e5 | 2016-09-23 14:47:36 | [diff] [blame] | 140 | ] |
| 141 | } |
| Zachary Anderson | 306b0ec | 2017-01-19 18:11:27 | [diff] [blame] | 142 | |
| Zach Anderson | 9847c06 | 2018-06-04 21:35:39 | [diff] [blame] | 143 | # This rule and the compressed_observatory_archive rule are for the Fuchsia |
| 144 | # bots that pre-build the Observatory. They copy the observatory tar files to |
| 145 | # the root build output directory for convenient access by the Fuchsia buildbot |
| 146 | # scripts. |
| Zach Anderson | 736ddd9 | 2018-05-29 16:35:34 | [diff] [blame] | 147 | group("observatory_archive") { |
| 148 | deps = [ |
| Zach Anderson | 9847c06 | 2018-06-04 21:35:39 | [diff] [blame] | 149 | "runtime/observatory:copy_observatory_archive", |
| 150 | ] |
| 151 | } |
| 152 | |
| 153 | group("compressed_observatory_archive") { |
| 154 | deps = [ |
| 155 | "runtime/observatory:copy_compressed_observatory_archive", |
| Zach Anderson | 736ddd9 | 2018-05-29 16:35:34 | [diff] [blame] | 156 | ] |
| 157 | } |