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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 ":generate_builtin_cc_file", | 131 ":generate_builtin_cc_file", |
132 ":generate_io_cc_file", | 132 ":generate_io_cc_file", |
133 ":generate_io_patch_cc_file", | 133 ":generate_io_patch_cc_file", |
134 ] | 134 ] |
135 include_dirs = [ | 135 include_dirs = [ |
136 "..", | 136 "..", |
137 ] | 137 ] |
138 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) | 138 set_sources_assignment_filter(["*_test.cc", "*_test.h"]) |
139 sources = [ | 139 sources = [ |
140 "log_android.cc", | 140 "log_android.cc", |
| 141 "log_fuchsia.cc", |
141 "log_linux.cc", | 142 "log_linux.cc", |
142 "log_macos.cc", | 143 "log_macos.cc", |
143 "log_win.cc", | 144 "log_win.cc", |
144 ] + builtin_impl_sources_gypi.sources | 145 ] + builtin_impl_sources_gypi.sources |
145 } | 146 } |
146 | 147 |
147 | 148 |
148 static_library("libdart_nosnapshot") { | 149 static_library("libdart_nosnapshot") { |
149 configs += ["..:dart_config", | 150 configs += ["..:dart_config", |
150 "..:dart_product_config", | 151 "..:dart_product_config", |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 206 |
206 include_dirs = [ | 207 include_dirs = [ |
207 "..", | 208 "..", |
208 ] | 209 ] |
209 | 210 |
210 defines = [ | 211 defines = [ |
211 "DART_SHARED_LIB", | 212 "DART_SHARED_LIB", |
212 ] | 213 ] |
213 } | 214 } |
214 | 215 |
215 if ((current_toolchain == host_toolchain) || | |
216 (!defined(is_fuchsia) || !is_fuchsia)) { | |
217 io_impl_sources_gypi = | 216 io_impl_sources_gypi = |
218 exec_script("../../tools/gypi_to_gn.py", | 217 exec_script("../../tools/gypi_to_gn.py", |
219 [ rebase_path("io_impl_sources.gypi") ], | 218 [ rebase_path("io_impl_sources.gypi") ], |
220 "scope", | 219 "scope", |
221 [ "io_impl_sources.gypi" ]) | 220 [ "io_impl_sources.gypi" ]) |
222 } | |
223 | 221 |
224 if (current_toolchain == host_toolchain) { | 222 if (current_toolchain == host_toolchain) { |
225 | 223 |
226 executable("gen_snapshot") { | 224 executable("gen_snapshot") { |
227 configs += ["..:dart_config", | 225 configs += ["..:dart_config", |
228 "..:dart_product_config", | 226 "..:dart_product_config", |
229 "..:dart_precompiler_config"] | 227 "..:dart_precompiler_config"] |
230 deps = [ | 228 deps = [ |
231 ":gen_resources_cc", | 229 ":gen_resources_cc", |
232 ":gen_snapshot_dart_io", | 230 ":gen_snapshot_dart_io", |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 source_set("libdart_embedder_noio") { | 303 source_set("libdart_embedder_noio") { |
306 configs += ["..:dart_config", | 304 configs += ["..:dart_config", |
307 "..:dart_product_config", | 305 "..:dart_product_config", |
308 "..:dart_precompiled_runtime_config"] | 306 "..:dart_precompiled_runtime_config"] |
309 deps = [ | 307 deps = [ |
310 "..:libdart", | 308 "..:libdart", |
311 "../vm:libdart_platform", | 309 "../vm:libdart_platform", |
312 ] | 310 ] |
313 } | 311 } |
314 | 312 |
315 if (!defined(is_fuchsia) || !is_fuchsia) { | |
316 | 313 |
317 # A source set for the implementation of 'dart:io' library | 314 # A source set for the implementation of 'dart:io' library |
318 # (without secure sockets). | 315 # (without secure sockets). |
319 source_set("embedded_dart_io") { | 316 source_set("embedded_dart_io") { |
320 configs += ["..:dart_config", | 317 configs += ["..:dart_config", |
321 "..:dart_product_config", | 318 "..:dart_product_config", |
322 "..:dart_precompiled_runtime_config"] | 319 "..:dart_precompiled_runtime_config"] |
323 | 320 |
324 custom_sources_filter = [ | 321 custom_sources_filter = [ |
325 "*_test.cc", | 322 "*_test.cc", |
326 "*_test.h", | 323 "*_test.h", |
327 "builtin.cc", | 324 "builtin.cc", |
328 "builtin_gen_snapshot.cc", | 325 "builtin_gen_snapshot.cc", |
329 ] | 326 ] |
330 if (!is_mac && !is_ios) { | 327 if (!is_mac && !is_ios) { |
331 # Dart tree uses *_macos.* instead of *_mac.* | 328 # Dart tree uses *_macos.* instead of *_mac.* |
332 custom_sources_filter += [ | 329 custom_sources_filter += [ |
333 "*_macos.h", | 330 "*_macos.h", |
334 "*_macos.cc", | 331 "*_macos.cc", |
335 ] | 332 ] |
336 } | 333 } |
337 set_sources_assignment_filter(custom_sources_filter) | 334 set_sources_assignment_filter(custom_sources_filter) |
338 | 335 |
339 if (is_mac || is_ios) { | 336 if (is_mac || is_ios) { |
340 libs = [ | 337 libs = [ |
341 "Security.framework", | 338 "Security.framework", |
342 ] | 339 ] |
| 340 } else if (defined(is_fuchsia) && is_fuchsia) { |
| 341 defines = [ |
| 342 "DART_IO_SECURE_SOCKET_DISABLED" |
| 343 ] |
343 } else { | 344 } else { |
344 deps = [ | 345 deps = [ |
345 rebase_path(dart_boringssl_path, "."), | 346 rebase_path(dart_boringssl_path, "."), |
346 ] | 347 ] |
347 } | 348 } |
348 | 349 |
349 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources | 350 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources |
350 sources += [ | 351 sources += [ |
351 "builtin_nolib.cc", | 352 "builtin_nolib.cc", |
352 "builtin_natives.cc", | 353 "builtin_natives.cc", |
353 "io_natives.cc", | 354 "io_natives.cc", |
354 "io_natives.h", | 355 "io_natives.h", |
355 "embedded_dart_io.cc", | 356 "embedded_dart_io.cc", |
356 "embedded_dart_io.h", | 357 "embedded_dart_io.h", |
357 "log_android.cc", | 358 "log_android.cc", |
358 "log_linux.cc", | 359 "log_linux.cc", |
359 "log_macos.cc", | 360 "log_macos.cc", |
360 "log_win.cc", | 361 "log_win.cc", |
361 "log.h", | 362 "log.h", |
362 ] | 363 ] |
363 if (is_linux) { | 364 if (is_linux) { |
364 sources += [ "../../third_party/root_certificates/root_certificates.cc"] | 365 sources += [ "../../third_party/root_certificates/root_certificates.cc"] |
365 } | 366 } |
366 | 367 |
367 include_dirs = [ | 368 include_dirs = [ |
368 "..", | 369 "..", |
369 "//third_party" | 370 "//third_party" |
370 ] | 371 ] |
371 } | 372 } |
372 } # !is_fuchsia | |
373 | 373 |
374 | 374 |
375 action("generate_snapshot_bin") { | 375 action("generate_snapshot_bin") { |
376 deps = [ | 376 deps = [ |
377 "../bin:gen_snapshot($host_toolchain)", | 377 "../bin:gen_snapshot($host_toolchain)", |
378 ] | 378 ] |
379 | 379 |
380 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" | 380 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" |
381 isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin" | 381 isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin" |
382 gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp" | 382 gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 include_dirs = [ | 459 include_dirs = [ |
460 "..", | 460 "..", |
461 "../include" | 461 "../include" |
462 ] | 462 ] |
463 | 463 |
464 deps = [ | 464 deps = [ |
465 ":dart_snapshot_cc", | 465 ":dart_snapshot_cc", |
466 ":libdart_embedder_noio", | 466 ":libdart_embedder_noio", |
467 ] | 467 ] |
468 } | 468 } |
469 } | 469 |
| 470 copy("hello_fuchsia") { |
| 471 sources = [ "../tests/vm/dart/hello_fuchsia_test.dart" ] |
| 472 outputs = [ "$root_out_dir/hello_fuchsia.dart" ] |
| 473 } |
| 474 |
| 475 executable("dart_no_observatory") { |
| 476 configs += ["..:dart_config", |
| 477 "..:dart_product_config", |
| 478 "..:dart_precompiled_runtime_config",] |
| 479 deps = [ |
| 480 ":hello_fuchsia", |
| 481 ":gen_resources_cc", |
| 482 ":embedded_dart_io", |
| 483 ":libdart_builtin", |
| 484 "../vm:libdart_platform", |
| 485 "..:libdart", |
| 486 ":dart_snapshot_cc", |
| 487 "//third_party/zlib", |
| 488 ] |
| 489 |
| 490 defines = [ |
| 491 "NO_OBSERVATORY", |
| 492 ] |
| 493 |
| 494 sources = [ |
| 495 "main.cc", |
| 496 "observatory_assets_empty.cc", |
| 497 "vmservice_impl.cc", |
| 498 "vmservice_impl.h", |
| 499 "$target_gen_dir/resources_gen.cc", |
| 500 ] |
| 501 |
| 502 include_dirs = [ |
| 503 "..", |
| 504 "//third_party", |
| 505 ] |
| 506 } |
| 507 } # defined(is_fuchsia) && is_fuchsia |
OLD | NEW |