| 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", | 
 |   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                             "*crypto*", | 
 |   37                             "*dbg*", | 
 |   38                             "*extensions*", | 
 |   39                             "*builtin*", | 
 |   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   if (!is_debug) { | 
 |   50     defines += [ "NDEBUG" ] | 
 |   51   } else { | 
 |   52     defines += [ "DEBUG" ] | 
 |   53   } | 
 |   54   set_sources_assignment_filter(custom_sources_filter) | 
 |   55   sources = | 
 |   56       rebase_path(io_impl_sources_gypi.sources, "", "//dart/runtime/bin") + | 
 |   57       rebase_path(builtin_impl_sources_gypi.sources, "", "//dart/runtime/bin") + | 
 |   58       [ | 
 |   59         "//dart/runtime/bin/log_android.cc", | 
 |   60         "//dart/runtime/bin/log_linux.cc", | 
 |   61         "//dart/runtime/bin/log_macos.cc", | 
 |   62         "//dart/runtime/bin/log_win.cc", | 
 |   63         "//dart/runtime/bin/log.h", | 
 |   64         "//dart/runtime/bin/io_natives.cc", | 
 |   65         "//dart/runtime/bin/io_natives.h", | 
 |   66       ] | 
 |   67  | 
 |   68   include_dirs = [ | 
 |   69     rebase_path("//dart/runtime"), | 
 |   70     rebase_path("//third_party"), | 
 |   71   ] | 
 |   72  | 
 |   73   # Restore sources assignment filter. | 
 |   74   set_sources_assignment_filter(sources_assignment_filter) | 
 |   75 } | 
 |   76  | 
|    8 source_set("bindings") { |   77 source_set("bindings") { | 
|    9   sources = [ |   78   sources = [ | 
|   10     "builtin.cc", |   79     "builtin.cc", | 
|   11     "builtin.h", |   80     "builtin.h", | 
|   12     "builtin_natives.cc", |   81     "builtin_natives.cc", | 
|   13     "builtin_natives.h", |   82     "builtin_natives.h", | 
|   14     "builtin_sky.cc", |   83     "builtin_sky.cc", | 
|   15     "builtin_sky.h", |   84     "builtin_sky.h", | 
|   16     "custom/dart_element_custom.cc", |   85     "custom/dart_element_custom.cc", | 
|   17     "dart_callback.cc", |   86     "dart_callback.cc", | 
|   18     "dart_callback.h", |   87     "dart_callback.h", | 
|   19     "dart_event_listener.cc", |   88     "dart_event_listener.cc", | 
|   20     "dart_event_listener.h", |   89     "dart_event_listener.h", | 
|   21     "exception_messages.cc", |   90     "exception_messages.cc", | 
|   22     "exception_messages.h", |   91     "exception_messages.h", | 
|   23     "exception_state.cc", |   92     "exception_state.cc", | 
|   24     "exception_state.h", |   93     "exception_state.h", | 
|   25     "exception_state_placeholder.cc", |   94     "exception_state_placeholder.cc", | 
|   26     "exception_state_placeholder.h", |   95     "exception_state_placeholder.h", | 
|   27     "mojo_natives.cc", |   96     "mojo_natives.cc", | 
|   28     "mojo_natives.h", |   97     "mojo_natives.h", | 
|   29     "nullable.h", |   98     "nullable.h", | 
|   30     "scheduled_action.cc", |   99     "scheduled_action.cc", | 
|   31     "scheduled_action.h", |  100     "scheduled_action.h", | 
|   32   ] |  101   ] | 
 |  102  | 
 |  103   defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] | 
 |  104  | 
|   33   deps = [ |  105   deps = [ | 
|   34     "//base", |  106     "//base", | 
|   35     "//dart/runtime/bin:libdart_withcore", |  107     "//dart/runtime/bin:libdart_withcore", | 
|   36     "//mojo/public/c/system", |  108     "//mojo/public/c/system", | 
|   37     "//mojo/public/cpp/system", |  109     "//mojo/public/cpp/system", | 
|   38     "//sky/engine/platform:platform", |  110     "//sky/engine/platform:platform", | 
|   39     "//sky/engine/tonic", |  111     "//sky/engine/tonic", | 
|   40     "//sky/engine/wtf", |  112     "//sky/engine/wtf", | 
 |  113     ":dart_io_no_secure_socket_bindings", | 
|   41     ":generated_bindings", |  114     ":generated_bindings", | 
|   42     ":snapshot_cc", |  115     ":snapshot_cc", | 
|   43   ] |  116   ] | 
|   44   include_dirs = [ |  117   include_dirs = [ | 
|   45     "..", |  118     "..", | 
|   46     "$root_build_dir", |  119     "$root_build_dir", | 
 |  120     rebase_path("//dart/runtime"), | 
|   47   ] |  121   ] | 
|   48 } |  122 } | 
|   49  |  123  | 
|   50 action("generate_snapshot_bin") { |  124 action("generate_snapshot_bin") { | 
|   51   deps = [ |  125   deps = [ | 
|   52     "//dart/runtime/bin:gen_snapshot($host_toolchain)", |  126     "//dart/runtime/bin:gen_snapshot($host_toolchain)", | 
|   53     ":generate_dart_sky", |  127     ":generate_dart_sky", | 
|   54   ] |  128   ] | 
|   55   inputs = [ |  129   inputs = [ | 
|   56     "//dart/runtime/tools/create_snapshot_bin.py", |  130     "//dart/runtime/tools/create_snapshot_bin.py", | 
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  381   ] |  455   ] | 
|  382  |  456  | 
|  383   include_dirs = [ |  457   include_dirs = [ | 
|  384     "..", |  458     "..", | 
|  385     "$root_build_dir", |  459     "$root_build_dir", | 
|  386   ] |  460   ] | 
|  387  |  461  | 
|  388   sources = get_target_outputs(":compile_idls") |  462   sources = get_target_outputs(":compile_idls") | 
|  389   sources += get_target_outputs(":generate_dart_globals") |  463   sources += get_target_outputs(":generate_dart_globals") | 
|  390 } |  464 } | 
| OLD | NEW |