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 (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 } |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 ":create_sdk", | 111 ":create_sdk", |
112 ] | 112 ] |
113 } | 113 } |
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 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. |
123 # 'dart_build_fuchsia_test_image' because building the image is slow. | |
124 if (is_fuchsia) { | 123 if (is_fuchsia) { |
125 declare_args() { | 124 declare_args() { |
126 dart_build_fuchsia_test_image = false | 125 dart_build_fuchsia_test_image = false |
127 } | 126 } |
128 | 127 |
129 action("generate_dart_test_manifest") { | 128 action("generate_dart_test_manifest") { |
130 testonly = true | 129 testonly = true |
131 | 130 |
132 deps = [ | 131 deps = [ |
133 "//packages/gn:mkbootfs", | 132 "//packages/gn:mkbootfs", |
134 ] | 133 ] |
135 | 134 |
136 output_prefix = "$target_gen_dir/dart_test_tree" | 135 output_prefix = "$target_gen_dir/dart_test_tree" |
137 outputs = [ | 136 outputs = [ |
138 "$output_prefix.manifest", | 137 "$output_prefix.manifest", |
139 ] | 138 ] |
140 | 139 |
141 mode = "release" | 140 mode = "release" |
142 if (is_debug) { | 141 if (is_debug) { |
143 mode = "debug" | 142 mode = "debug" |
144 } | 143 } |
145 | 144 |
146 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") | 145 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") |
147 user_manifest = "$mkbootfs_gen/user.bootfs.manifest" | 146 system_manifest = "$mkbootfs_gen/system.bootfs.manifest" |
148 | 147 |
149 script = "tools/gen_fuchsia_test_manifest.py" | 148 script = "tools/gen_fuchsia_test_manifest.py" |
150 args = [ | 149 args = [ |
151 "-m", | 150 "-m", |
152 mode, | 151 mode, |
153 "-u", | 152 "-u", |
154 rebase_path(user_manifest), | 153 rebase_path(system_manifest), |
155 "-o", | 154 "-o", |
156 rebase_path(output_prefix), | 155 rebase_path(output_prefix), |
157 ] | 156 ] |
158 } | 157 } |
159 | 158 |
160 action("generate_dart_test_image") { | 159 action("generate_dart_test_image") { |
161 testonly = true | 160 testonly = true |
162 deps = [ | 161 deps = [ |
163 ":generate_dart_test_manifest", | 162 ":generate_dart_test_manifest", |
164 "runtime/bin:dart", | 163 "runtime/bin:dart", |
165 "runtime/bin:process_test", | 164 "runtime/bin:process_test", |
166 "runtime/bin:run_vm_tests", | 165 "runtime/bin:run_vm_tests", |
167 ] | 166 ] |
168 | 167 |
| 168 mkbootfs_gen = get_label_info("//packages/gn:mkbootfs", "target_gen_dir") |
| 169 boot_manifest = "$mkbootfs_gen/boot.bootfs.manifest" |
| 170 |
169 # Compute path to magenta bootdata.bin | 171 # Compute path to magenta bootdata.bin |
170 if (current_cpu == "arm64") { | 172 if (current_cpu == "arm64") { |
171 magenta_bootdata = | 173 magenta_bootdata = |
172 "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin" | 174 "//out/build-magenta/build-magenta-qemu-arm64/bootdata.bin" |
173 } else if (current_cpu == "x64") { | 175 } else if (current_cpu == "x64") { |
174 magenta_bootdata = | 176 magenta_bootdata = |
175 "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin" | 177 "//out/build-magenta/build-magenta-pc-x86-64/bootdata.bin" |
176 } else { | 178 } else { |
177 assert(false, "unable to determine path to magenta's bootdata.bin") | 179 assert(false, "unable to determine path to magenta's bootdata.bin") |
178 } | 180 } |
179 | 181 |
180 input = "$target_gen_dir/dart_test_tree.manifest" | 182 input = "$target_gen_dir/dart_test_tree.manifest" |
181 inputs = [ | 183 inputs = [ |
182 magenta_bootdata, | 184 magenta_bootdata, |
183 input, | 185 input, |
184 ] | 186 ] |
185 | 187 |
186 output = "$root_out_dir/dart_test_tree.bin" | 188 output = "$root_out_dir/dart_test_tree.bin" |
187 outputs = [ | 189 outputs = [ |
188 output, | 190 output, |
189 ] | 191 ] |
190 | 192 |
191 script = "//packages/gn/make_bootfs.py" | 193 script = "//packages/gn/make_bootfs.py" |
192 args = [ | 194 args = [ |
193 "--manifest", | 195 "--boot-manifest", |
| 196 rebase_path(boot_manifest), |
| 197 "--system-manifest", |
194 rebase_path(input), | 198 rebase_path(input), |
195 "--output-file", | 199 "--output-file", |
196 rebase_path(output), | 200 rebase_path(output), |
197 "--build-id-map", | 201 "--build-id-map", |
198 rebase_path("$target_gen_dir/build_id_map"), | 202 rebase_path("$target_gen_dir/build_id_map"), |
199 "--pre-binaries", | 203 "--pre-binaries", |
200 rebase_path(magenta_bootdata), | 204 rebase_path(magenta_bootdata), |
201 ] | 205 ] |
202 } | 206 } |
203 } | 207 } |
OLD | NEW |