OLD | NEW |
---|---|
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//sky/engine/bindings/bindings.gni") | 5 import("//sky/engine/bindings/bindings.gni") |
6 import("//sky/engine/core/core.gni") | 6 import("//sky/engine/core/core.gni") |
7 | 7 |
8 io_impl_sources_gypi = | |
9 exec_script("../../../dart/tools/gypi_to_gn.py", | |
eseidel
2015/05/05 23:18:10
Instead of making this relative, rebase_path('//fu
| |
10 [ rebase_path("//dart/runtime/bin/io_impl_sources.gypi") ], | |
11 "scope", | |
12 [ "//dart/runtime/bin/io_impl_sources.gypi" ]) | |
13 | |
14 builtin_impl_sources_gypi = | |
15 exec_script("../../../dart/tools/gypi_to_gn.py", | |
16 [ rebase_path("//dart/runtime/bin/builtin_impl_sources.gypi") ], | |
17 "scope", | |
18 [ "//dart/runtime/bin/builtin_impl_sources.gypi" ]) | |
19 | |
20 # A source set for the implementation of 'dart:io' library | |
21 # (without secure sockets). | |
22 source_set("dart_io_no_secure_socket_bindings") { | |
23 # Set custom sources assignment filter. The custom filters does three things: | |
24 # 1) Filters out unnecessary files pulled in from the gypi files. | |
25 # 2) Filters out secure socket support. | |
26 # 3) Enables dart:io by filtering out _unsupported.cc implementations. | |
27 custom_sources_filter = sources_assignment_filter + [ | |
28 "*net/nss_memio.cc", | |
29 "*net/nss_memio.h", | |
30 "*secure_socket.cc", | |
31 "*secure_socket.h", | |
32 "*filter_unsupported.cc", | |
33 "*io_service_unsupported.cc", | |
34 "*_test.cc", | |
35 "*_test.h", | |
36 "*dbg*", | |
37 "builtin.cc", | |
38 "builtin_natives.cc", | |
39 "builtin_gen_snapshot.cc", | |
40 ] | |
41 if (!is_mac) { | |
42 # Dart tree uses *_macos.* instead of *_mac.* | |
43 custom_sources_filter += [ | |
44 "*_macos.h", | |
45 "*_macos.cc", | |
46 ] | |
47 } | |
48 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] | |
49 | |
50 if (!is_debug) { | |
51 defines += [ "NDEBUG" ] | |
52 } else { | |
53 defines += [ "DEBUG" ] | |
54 } | |
55 set_sources_assignment_filter(custom_sources_filter) | |
56 sources = | |
57 rebase_path(io_impl_sources_gypi.sources, "", "//dart/runtime/bin") + | |
58 rebase_path(builtin_impl_sources_gypi.sources, "", "//dart/runtime/bin") + | |
59 [ | |
60 "//dart/runtime/bin/log_android.cc", | |
eseidel
2015/05/05 23:18:10
It's still a bit odd to have these paths in //sky
| |
61 "//dart/runtime/bin/log_linux.cc", | |
62 "//dart/runtime/bin/log_macos.cc", | |
63 "//dart/runtime/bin/log_win.cc", | |
64 "//dart/runtime/bin/log.h", | |
65 "//dart/runtime/bin/io_natives.cc", | |
66 "//dart/runtime/bin/io_natives.h", | |
67 "//dart/runtime/bin/builtin_nolib.cc", | |
68 "//dart/runtime/bin/builtin_natives.cc", | |
69 ] | |
70 | |
71 sources += [ | |
72 "dart_io.cc", | |
73 "dart_io.h", | |
74 ] | |
75 | |
76 include_dirs = [ | |
77 rebase_path("//dart/runtime"), | |
78 rebase_path("//third_party"), | |
79 ] | |
80 | |
81 # Restore sources assignment filter. | |
82 set_sources_assignment_filter(sources_assignment_filter) | |
83 } | |
84 | |
8 source_set("bindings") { | 85 source_set("bindings") { |
9 sources = [ | 86 sources = [ |
10 "builtin.cc", | 87 "builtin.cc", |
11 "builtin.h", | 88 "builtin.h", |
12 "builtin_natives.cc", | 89 "builtin_natives.cc", |
13 "builtin_natives.h", | 90 "builtin_natives.h", |
14 "builtin_sky.cc", | 91 "builtin_sky.cc", |
15 "builtin_sky.h", | 92 "builtin_sky.h", |
16 "custom/dart_element_custom.cc", | 93 "custom/dart_element_custom.cc", |
17 "dart_callback.cc", | 94 "dart_callback.cc", |
18 "dart_callback.h", | 95 "dart_callback.h", |
19 "dart_event_listener.cc", | 96 "dart_event_listener.cc", |
20 "dart_event_listener.h", | 97 "dart_event_listener.h", |
21 "exception_messages.cc", | 98 "exception_messages.cc", |
22 "exception_messages.h", | 99 "exception_messages.h", |
23 "exception_state.cc", | 100 "exception_state.cc", |
24 "exception_state.h", | 101 "exception_state.h", |
25 "exception_state_placeholder.cc", | 102 "exception_state_placeholder.cc", |
26 "exception_state_placeholder.h", | 103 "exception_state_placeholder.h", |
27 "mojo_natives.cc", | 104 "mojo_natives.cc", |
28 "mojo_natives.h", | 105 "mojo_natives.h", |
29 "nullable.h", | 106 "nullable.h", |
30 "scheduled_action.cc", | 107 "scheduled_action.cc", |
31 "scheduled_action.h", | 108 "scheduled_action.h", |
32 ] | 109 ] |
110 | |
111 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] | |
112 | |
33 deps = [ | 113 deps = [ |
34 "//base", | 114 "//base", |
35 "//dart/runtime/bin:libdart_withcore", | 115 "//dart/runtime/bin:libdart_withcore", |
36 "//mojo/public/c/system", | 116 "//mojo/public/c/system", |
37 "//mojo/public/cpp/system", | 117 "//mojo/public/cpp/system", |
38 "//sky/engine/platform:platform", | 118 "//sky/engine/platform:platform", |
39 "//sky/engine/tonic", | 119 "//sky/engine/tonic", |
40 "//sky/engine/wtf", | 120 "//sky/engine/wtf", |
121 ":dart_io_no_secure_socket_bindings", | |
41 ":generated_bindings", | 122 ":generated_bindings", |
42 ":snapshot_cc", | 123 ":snapshot_cc", |
43 ] | 124 ] |
44 include_dirs = [ | 125 include_dirs = [ |
45 "..", | 126 "..", |
46 "$root_build_dir", | 127 "$root_build_dir", |
128 rebase_path("//dart/runtime"), | |
47 ] | 129 ] |
48 } | 130 } |
49 | 131 |
50 action("generate_snapshot_bin") { | 132 action("generate_snapshot_bin") { |
51 deps = [ | 133 deps = [ |
52 "//dart/runtime/bin:gen_snapshot($host_toolchain)", | 134 "//dart/runtime/bin:gen_snapshot($host_toolchain)", |
53 ":generate_dart_sky", | 135 ":generate_dart_sky", |
54 ] | 136 ] |
55 inputs = [ | 137 inputs = [ |
56 "//dart/runtime/tools/create_snapshot_bin.py", | 138 "//dart/runtime/tools/create_snapshot_bin.py", |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
381 ] | 463 ] |
382 | 464 |
383 include_dirs = [ | 465 include_dirs = [ |
384 "..", | 466 "..", |
385 "$root_build_dir", | 467 "$root_build_dir", |
386 ] | 468 ] |
387 | 469 |
388 sources = get_target_outputs(":compile_idls") | 470 sources = get_target_outputs(":compile_idls") |
389 sources += get_target_outputs(":generate_dart_globals") | 471 sources += get_target_outputs(":generate_dart_globals") |
390 } | 472 } |
OLD | NEW |