OLD | NEW |
1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 # Copyright (c) 2014, 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 | 5 |
6 declare_args() { | 6 declare_args() { |
7 dart_io_support = false | 7 dart_io_support = false |
8 | 8 |
9 # TODO(zra, jamesr): Remove this check once we start building boringssl for | 9 # TODO(zra, jamesr): Remove this check once we start building boringssl for |
10 # the fuchsia port. | 10 # the fuchsia port. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 include_dirs = [ | 206 include_dirs = [ |
207 "..", | 207 "..", |
208 ] | 208 ] |
209 | 209 |
210 defines = [ | 210 defines = [ |
211 "DART_SHARED_LIB", | 211 "DART_SHARED_LIB", |
212 ] | 212 ] |
213 } | 213 } |
214 | 214 |
215 if (!defined(is_fuchsia) || !is_fuchsia) { | 215 if ((current_toolchain == host_toolchain) || |
| 216 (!defined(is_fuchsia) || !is_fuchsia)) { |
| 217 io_impl_sources_gypi = |
| 218 exec_script("../../tools/gypi_to_gn.py", |
| 219 [ rebase_path("io_impl_sources.gypi") ], |
| 220 "scope", |
| 221 [ "io_impl_sources.gypi" ]) |
| 222 } |
| 223 |
| 224 if (current_toolchain == host_toolchain) { |
216 | 225 |
217 executable("gen_snapshot") { | 226 executable("gen_snapshot") { |
218 configs += ["..:dart_config", | 227 configs += ["..:dart_config", |
219 "..:dart_product_config", | 228 "..:dart_product_config", |
220 "..:dart_precompiler_config"] | 229 "..:dart_precompiler_config"] |
221 deps = [ | 230 deps = [ |
222 ":gen_resources_cc", | 231 ":gen_resources_cc", |
223 ":gen_snapshot_dart_io", | 232 ":gen_snapshot_dart_io", |
224 ":generate_builtin_cc_file", | 233 ":generate_builtin_cc_file", |
225 ":generate_io_cc_file", | 234 ":generate_io_cc_file", |
(...skipping 17 matching lines...) Expand all Loading... |
243 "$target_gen_dir/io_gen.cc", | 252 "$target_gen_dir/io_gen.cc", |
244 "$target_gen_dir/io_patch_gen.cc", | 253 "$target_gen_dir/io_patch_gen.cc", |
245 "$target_gen_dir/resources_gen.cc", | 254 "$target_gen_dir/resources_gen.cc", |
246 ] | 255 ] |
247 | 256 |
248 include_dirs = [ | 257 include_dirs = [ |
249 "..", | 258 "..", |
250 ] | 259 ] |
251 } | 260 } |
252 | 261 |
253 | |
254 source_set("libdart_embedder_noio") { | |
255 configs += ["..:dart_config", | |
256 "..:dart_product_config", | |
257 "..:dart_precompiled_runtime_config"] | |
258 deps = [ | |
259 "..:libdart", | |
260 "../vm:libdart_platform", | |
261 ] | |
262 } | |
263 | |
264 io_impl_sources_gypi = | |
265 exec_script("../../tools/gypi_to_gn.py", | |
266 [ rebase_path("io_impl_sources.gypi") ], | |
267 "scope", | |
268 [ "io_impl_sources.gypi" ]) | |
269 | |
270 | |
271 # A source set for the implementation of 'dart:io' library | 262 # A source set for the implementation of 'dart:io' library |
272 # (without secure sockets) suitable for linking with gen_snapshot. | 263 # (without secure sockets) suitable for linking with gen_snapshot. |
273 source_set("gen_snapshot_dart_io") { | 264 source_set("gen_snapshot_dart_io") { |
274 configs += ["..:dart_config", | 265 configs += ["..:dart_config", |
275 "..:dart_product_config", | 266 "..:dart_product_config", |
276 "..:dart_precompiler_config"] | 267 "..:dart_precompiler_config"] |
277 | 268 |
278 deps = [ | 269 deps = [ |
279 "//third_party/zlib", | 270 "//third_party/zlib", |
280 ] | 271 ] |
(...skipping 21 matching lines...) Expand all Loading... |
302 "io_natives.cc", | 293 "io_natives.cc", |
303 "io_natives.h", | 294 "io_natives.h", |
304 ] | 295 ] |
305 | 296 |
306 include_dirs = [ | 297 include_dirs = [ |
307 "..", | 298 "..", |
308 "//third_party" | 299 "//third_party" |
309 ] | 300 ] |
310 } | 301 } |
311 | 302 |
| 303 } # current_toolchain == host_toolchain |
| 304 |
| 305 source_set("libdart_embedder_noio") { |
| 306 configs += ["..:dart_config", |
| 307 "..:dart_product_config", |
| 308 "..:dart_precompiled_runtime_config"] |
| 309 deps = [ |
| 310 "..:libdart", |
| 311 "../vm:libdart_platform", |
| 312 ] |
| 313 } |
| 314 |
| 315 if (!defined(is_fuchsia) || !is_fuchsia) { |
| 316 |
312 # A source set for the implementation of 'dart:io' library | 317 # A source set for the implementation of 'dart:io' library |
313 # (without secure sockets). | 318 # (without secure sockets). |
314 source_set("embedded_dart_io") { | 319 source_set("embedded_dart_io") { |
315 configs += ["..:dart_config", | 320 configs += ["..:dart_config", |
316 "..:dart_product_config", | 321 "..:dart_product_config", |
317 "..:dart_precompiled_runtime_config"] | 322 "..:dart_precompiled_runtime_config"] |
318 | 323 |
319 custom_sources_filter = [ | 324 custom_sources_filter = [ |
320 "*_test.cc", | 325 "*_test.cc", |
321 "*_test.h", | 326 "*_test.h", |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 "log.h", | 361 "log.h", |
357 ] | 362 ] |
358 | 363 |
359 include_dirs = [ | 364 include_dirs = [ |
360 "..", | 365 "..", |
361 "//third_party" | 366 "//third_party" |
362 ] | 367 ] |
363 } | 368 } |
364 } # !is_fuchsia | 369 } # !is_fuchsia |
365 | 370 |
| 371 |
| 372 action("generate_snapshot_bin") { |
| 373 deps = [ |
| 374 "../bin:gen_snapshot($host_toolchain)", |
| 375 ] |
| 376 |
| 377 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" |
| 378 isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin" |
| 379 gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp" |
| 380 outputs = [ |
| 381 vm_isolate_snapshot, |
| 382 isolate_snapshot, |
| 383 gen_snapshot_stamp_file, |
| 384 ] |
| 385 |
| 386 gen_snapshot_dir = |
| 387 get_label_info("../bin:gen_snapshot($host_toolchain)", "root_out_dir") |
| 388 |
| 389 script = rebase_path("../tools/create_snapshot_bin.py") |
| 390 args = [ |
| 391 "--executable", |
| 392 rebase_path("$gen_snapshot_dir/gen_snapshot"), |
| 393 "--vm_output_bin", |
| 394 rebase_path(vm_isolate_snapshot, root_build_dir), |
| 395 "--output_bin", |
| 396 rebase_path(isolate_snapshot, root_build_dir), |
| 397 "--target_os", |
| 398 current_os, |
| 399 "--timestamp_file", |
| 400 rebase_path(gen_snapshot_stamp_file, root_build_dir), |
| 401 ] |
| 402 } |
| 403 |
| 404 |
| 405 action("generate_snapshot_file") { |
| 406 deps = [ |
| 407 ":generate_snapshot_bin", |
| 408 ] |
| 409 |
| 410 snapshot_in_cc_file = "snapshot_in.cc" |
| 411 inputs = [ |
| 412 "../tools/create_snapshot_file.py", |
| 413 snapshot_in_cc_file, |
| 414 "$target_gen_dir/vm_isolate_snapshot.bin", |
| 415 "$target_gen_dir/isolate_snapshot.bin", |
| 416 ] |
| 417 output = "$root_gen_dir/dart_snapshot.cc" |
| 418 outputs = [ |
| 419 output, |
| 420 ] |
| 421 |
| 422 script = "../tools/create_snapshot_file.py" |
| 423 args = [ |
| 424 "--vm_input_bin", |
| 425 rebase_path("$target_gen_dir/vm_isolate_snapshot.bin"), |
| 426 "--input_bin", |
| 427 rebase_path("$target_gen_dir/isolate_snapshot.bin"), |
| 428 "--input_cc", |
| 429 rebase_path(snapshot_in_cc_file), |
| 430 "--output", |
| 431 rebase_path(output), |
| 432 ] |
| 433 } |
| 434 |
| 435 |
| 436 source_set("dart_snapshot_cc") { |
| 437 sources = [ |
| 438 "$root_gen_dir/dart_snapshot.cc", |
| 439 ] |
| 440 |
| 441 deps = [ |
| 442 ":generate_snapshot_file", |
| 443 ] |
| 444 } |
| 445 |
366 if (defined(is_fuchsia) && is_fuchsia) { | 446 if (defined(is_fuchsia) && is_fuchsia) { |
367 executable("fuchsia_test") { | 447 executable("fuchsia_test") { |
368 configs += ["..:dart_config", | 448 configs += ["..:dart_config", |
369 "..:dart_product_config", | 449 "..:dart_product_config", |
370 "..:dart_precompiled_runtime_config"] | 450 "..:dart_precompiled_runtime_config"] |
371 sources = [ | 451 sources = [ |
372 "fuchsia_test.cc", | 452 "fuchsia_test.cc", |
373 "log_fuchsia.cc", | 453 "log_fuchsia.cc", |
374 ] | 454 ] |
375 | 455 |
376 include_dirs = [ | 456 include_dirs = [ |
377 "..", | 457 "..", |
378 "../include" | 458 "../include" |
379 ] | 459 ] |
380 | 460 |
381 deps = [ | 461 deps = [ |
382 ":libdart_nosnapshot" | 462 ":dart_snapshot_cc", |
| 463 ":libdart_embedder_noio", |
383 ] | 464 ] |
384 } | 465 } |
385 } | 466 } |
OLD | NEW |