| 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 # This target will be built if no target is specified when invoking ninja. | 5 # This target will be built if no target is specified when invoking ninja. |
| 6 group("default") { | 6 group("default") { |
| 7 if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) { | 7 if (is_fuchsia || is_fuchsia_host) { |
| 8 # Fuchsia has run_vm_tests marked testonly. | 8 # Fuchsia has run_vm_tests marked testonly. |
| 9 testonly = true | 9 testonly = true |
| 10 } | 10 } |
| 11 deps = [ | 11 deps = [ |
| 12 ":runtime", | 12 ":runtime", |
| 13 ] | 13 ] |
| 14 } | 14 } |
| 15 | 15 |
| 16 group("most") { | 16 group("most") { |
| 17 if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) { | 17 if (is_fuchsia || is_fuchsia_host) { |
| 18 # Fuchsia has run_vm_tests marked testonly. | 18 # Fuchsia has run_vm_tests marked testonly. |
| 19 testonly = true | 19 testonly = true |
| 20 } | 20 } |
| 21 deps = [ | 21 deps = [ |
| 22 ":analysis_server", | 22 ":analysis_server", |
| 23 ":create_sdk", | 23 ":create_sdk", |
| 24 ":dart2js", | 24 ":dart2js", |
| 25 ":dartanalyzer", | 25 ":dartanalyzer", |
| 26 ":dartdevc", | 26 ":dartdevc", |
| 27 ":runtime", | 27 ":runtime", |
| 28 ":samples", | 28 ":samples", |
| 29 ] | 29 ] |
| 30 } | 30 } |
| 31 | 31 |
| 32 group("runtime") { | 32 group("runtime") { |
| 33 if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) { | 33 if (is_fuchsia || is_fuchsia_host) { |
| 34 # Fuchsia has run_vm_tests marked testonly. | 34 # Fuchsia has run_vm_tests marked testonly. |
| 35 testonly = true | 35 testonly = true |
| 36 } | 36 } |
| 37 deps = [ | 37 deps = [ |
| 38 "runtime/bin:dart", | 38 "runtime/bin:dart", |
| 39 "runtime/bin:dart_bootstrap($host_toolchain)", | 39 "runtime/bin:dart_bootstrap($host_toolchain)", |
| 40 "runtime/bin:process_test", | 40 "runtime/bin:process_test", |
| 41 "runtime/bin:run_vm_tests", | 41 "runtime/bin:run_vm_tests", |
| 42 "runtime/bin:sample_extension", | 42 "runtime/bin:sample_extension", |
| 43 "runtime/bin:test_extension", | 43 "runtime/bin:test_extension", |
| 44 "runtime/vm:patched_sdk", | 44 "runtime/vm:patched_sdk", |
| 45 ] | 45 ] |
| 46 } | 46 } |
| 47 | 47 |
| 48 group("runtime_kernel") { | 48 group("runtime_kernel") { |
| 49 if (defined(is_fuchsia) && (is_fuchsia || is_fuchsia_host)) { | 49 if (is_fuchsia || is_fuchsia_host) { |
| 50 # Fuchsia has run_vm_tests marked testonly. | 50 # Fuchsia has run_vm_tests marked testonly. |
| 51 testonly = true | 51 testonly = true |
| 52 } | 52 } |
| 53 deps = [ | 53 deps = [ |
| 54 ":runtime", | 54 ":runtime", |
| 55 | 55 |
| 56 # TODO(rmacnak): Link this into 'dart'. | 56 # TODO(rmacnak): Link this into 'dart'. |
| 57 "utils/kernel-service:kernel-service", | 57 "utils/kernel-service:kernel-service", |
| 58 ] | 58 ] |
| 59 } | 59 } |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 | 114 |
| 115 group("samples") { | 115 group("samples") { |
| 116 deps = [ | 116 deps = [ |
| 117 "runtime/bin:sample_extension", | 117 "runtime/bin:sample_extension", |
| 118 ] | 118 ] |
| 119 } | 119 } |
| 120 | 120 |
| 121 # The rules below build a qemu Fuchsia OS image that includes the Dart tree | 121 # The rules below build a qemu Fuchsia OS image that includes the Dart tree |
| 122 # under /system/test/dart. Building this image is gated by the GN argument | 122 # under /system/test/dart. Building this image is gated by the GN argument |
| 123 # 'dart_build_fuchsia_test_image' because building the image is slow. | 123 # 'dart_build_fuchsia_test_image' because building the image is slow. |
| 124 if (defined(is_fuchsia) && is_fuchsia) { | 124 if (is_fuchsia) { |
| 125 declare_args() { | 125 declare_args() { |
| 126 dart_build_fuchsia_test_image = false | 126 dart_build_fuchsia_test_image = false |
| 127 } | 127 } |
| 128 | 128 |
| 129 if (dart_build_fuchsia_test_image) { | 129 action("generate_dart_test_manifest") { |
| 130 action("generate_dart_test_manifest") { | 130 testonly = true |
| 131 testonly = true | |
| 132 | 131 |
| 133 deps = [ | 132 deps = [ |
| 134 "//packages/gn:mkbootfs", | 133 "//packages/gn:mkbootfs", |
| 135 ] | 134 ] |
| 136 | 135 |
| 137 output_prefix = "$target_gen_dir/dart_test_tree" | 136 output_prefix = "$target_gen_dir/dart_test_tree" |
| 138 outputs = [ | 137 outputs = [ |
| 139 "$output_prefix.manifest", | 138 "$output_prefix.manifest", |
| 140 ] | 139 ] |
| 141 | 140 |
| 142 mode = "release" | 141 mode = "release" |
| 143 if (is_debug) { | 142 if (is_debug) { |
| 144 mode = "debug" | 143 mode = "debug" |
| 145 } | |
| 146 | |
| 147 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") | |
| 148 user_manifest = "$mkbootfs_gen/user.bootfs.manifest" | |
| 149 | |
| 150 script = "tools/gen_fuchsia_test_manifest.py" | |
| 151 args = [ | |
| 152 "-m", | |
| 153 mode, | |
| 154 "-u", | |
| 155 rebase_path(user_manifest), | |
| 156 "-o", | |
| 157 rebase_path(output_prefix), | |
| 158 ] | |
| 159 } | 144 } |
| 160 | 145 |
| 161 action("generate_dart_test_image") { | 146 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") |
| 162 testonly = true | 147 user_manifest = "$mkbootfs_gen/user.bootfs.manifest" |
| 163 deps = [ | |
| 164 ":generate_dart_test_manifest", | |
| 165 "runtime/bin:dart", | |
| 166 "runtime/bin:process_test", | |
| 167 "runtime/bin:run_vm_tests", | |
| 168 ] | |
| 169 | 148 |
| 170 # Compute path to magenta bootdata.bin | 149 script = "tools/gen_fuchsia_test_manifest.py" |
| 171 if (current_cpu == "arm64") { | 150 args = [ |
| 172 magenta_bootdata = | 151 "-m", |
| 173 "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin" | 152 mode, |
| 174 } else if (current_cpu == "x64") { | 153 "-u", |
| 175 magenta_bootdata = | 154 rebase_path(user_manifest), |
| 176 "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin" | 155 "-o", |
| 177 } else { | 156 rebase_path(output_prefix), |
| 178 assert(false, "unable to determine path to magenta's bootdata.bin") | 157 ] |
| 179 } | 158 } |
| 180 | 159 |
| 181 input = "$target_gen_dir/dart_test_tree.manifest" | 160 action("generate_dart_test_image") { |
| 182 inputs = [ | 161 testonly = true |
| 183 magenta_bootdata, | 162 deps = [ |
| 184 input, | 163 ":generate_dart_test_manifest", |
| 185 ] | 164 "runtime/bin:dart", |
| 165 "runtime/bin:process_test", |
| 166 "runtime/bin:run_vm_tests", |
| 167 ] |
| 186 | 168 |
| 187 output = "$root_out_dir/dart_test_tree.bin" | 169 # Compute path to magenta bootdata.bin |
| 188 outputs = [ | 170 if (current_cpu == "arm64") { |
| 189 output, | 171 magenta_bootdata = |
| 190 ] | 172 "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin" |
| 173 } else if (current_cpu == "x64") { |
| 174 magenta_bootdata = |
| 175 "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin" |
| 176 } else { |
| 177 assert(false, "unable to determine path to magenta's bootdata.bin") |
| 178 } |
| 191 | 179 |
| 192 script = "//packages/gn/make_bootfs.py" | 180 input = "$target_gen_dir/dart_test_tree.manifest" |
| 193 args = [ | 181 inputs = [ |
| 194 "--manifest", | 182 magenta_bootdata, |
| 195 rebase_path(input), | 183 input, |
| 196 "--output-file", | 184 ] |
| 197 rebase_path(output), | 185 |
| 198 "--build-id-map", | 186 output = "$root_out_dir/dart_test_tree.bin" |
| 199 rebase_path("$target_gen_dir/build_id_map"), | 187 outputs = [ |
| 200 "--pre-binaries", | 188 output, |
| 201 rebase_path(magenta_bootdata), | 189 ] |
| 202 ] | 190 |
| 203 } | 191 script = "//packages/gn/make_bootfs.py" |
| 192 args = [ |
| 193 "--manifest", |
| 194 rebase_path(input), |
| 195 "--output-file", |
| 196 rebase_path(output), |
| 197 "--build-id-map", |
| 198 rebase_path("$target_gen_dir/build_id_map"), |
| 199 "--pre-binaries", |
| 200 rebase_path(magenta_bootdata), |
| 201 ] |
| 204 } | 202 } |
| 205 } | 203 } |
| OLD | NEW |