| Index: sky/engine/bindings/BUILD.gn
 | 
| diff --git a/sky/engine/bindings/BUILD.gn b/sky/engine/bindings/BUILD.gn
 | 
| index 0e8edf2363ecfa6347a482d54aa6f1a519f830db..551742ef56b9126dc74bfbc21d0d2c40cfadfece 100644
 | 
| --- a/sky/engine/bindings/BUILD.gn
 | 
| +++ b/sky/engine/bindings/BUILD.gn
 | 
| @@ -5,6 +5,75 @@
 | 
|  import("//sky/engine/bindings/bindings.gni")
 | 
|  import("//sky/engine/core/core.gni")
 | 
|  
 | 
| +io_impl_sources_gypi =
 | 
| +    exec_script("../../../dart/tools/gypi_to_gn.py",
 | 
| +                [ rebase_path("//dart/runtime/bin/io_impl_sources.gypi") ],
 | 
| +                "scope",
 | 
| +                [ "//dart/runtime/bin/io_impl_sources.gypi" ])
 | 
| +
 | 
| +builtin_impl_sources_gypi =
 | 
| +    exec_script("../../../dart/tools/gypi_to_gn.py",
 | 
| +                [ rebase_path("//dart/runtime/bin/builtin_impl_sources.gypi") ],
 | 
| +                "scope",
 | 
| +                [ "//dart/runtime/bin/builtin_impl_sources.gypi" ])
 | 
| +
 | 
| +# A source set for the implementation of 'dart:io' library
 | 
| +# (without secure sockets).
 | 
| +source_set("dart_io_no_secure_socket_bindings") {
 | 
| +  # Set custom sources assignment filter. The custom filters does three things:
 | 
| +  # 1) Filters out unnecessary files pulled in from the gypi files.
 | 
| +  # 2) Filters out secure socket support.
 | 
| +  # 3) Enables dart:io by filtering out _unsupported.cc implementations.
 | 
| +  custom_sources_filter = sources_assignment_filter + [
 | 
| +                            "*net/nss_memio.cc",
 | 
| +                            "*net/nss_memio.h",
 | 
| +                            "*secure_socket.cc",
 | 
| +                            "*secure_socket.h",
 | 
| +                            "*filter_unsupported.cc",
 | 
| +                            "*io_service_unsupported.cc",
 | 
| +                            "*_test.cc",
 | 
| +                            "*_test.h",
 | 
| +                            "*crypto*",
 | 
| +                            "*dbg*",
 | 
| +                            "*extensions*",
 | 
| +                            "*builtin*",
 | 
| +                          ]
 | 
| +  if (!is_mac) {
 | 
| +    # Dart tree uses *_macos.* instead of *_mac.*
 | 
| +    custom_sources_filter += [
 | 
| +      "*_macos.h",
 | 
| +      "*_macos.cc",
 | 
| +    ]
 | 
| +  }
 | 
| +  defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
 | 
| +  if (!is_debug) {
 | 
| +    defines += [ "NDEBUG" ]
 | 
| +  } else {
 | 
| +    defines += [ "DEBUG" ]
 | 
| +  }
 | 
| +  set_sources_assignment_filter(custom_sources_filter)
 | 
| +  sources =
 | 
| +      rebase_path(io_impl_sources_gypi.sources, "", "//dart/runtime/bin") +
 | 
| +      rebase_path(builtin_impl_sources_gypi.sources, "", "//dart/runtime/bin") +
 | 
| +      [
 | 
| +        "//dart/runtime/bin/log_android.cc",
 | 
| +        "//dart/runtime/bin/log_linux.cc",
 | 
| +        "//dart/runtime/bin/log_macos.cc",
 | 
| +        "//dart/runtime/bin/log_win.cc",
 | 
| +        "//dart/runtime/bin/log.h",
 | 
| +        "//dart/runtime/bin/io_natives.cc",
 | 
| +        "//dart/runtime/bin/io_natives.h",
 | 
| +      ]
 | 
| +
 | 
| +  include_dirs = [
 | 
| +    rebase_path("//dart/runtime"),
 | 
| +    rebase_path("//third_party"),
 | 
| +  ]
 | 
| +
 | 
| +  # Restore sources assignment filter.
 | 
| +  set_sources_assignment_filter(sources_assignment_filter)
 | 
| +}
 | 
| +
 | 
|  source_set("bindings") {
 | 
|    sources = [
 | 
|      "builtin.cc",
 | 
| @@ -30,6 +99,9 @@ source_set("bindings") {
 | 
|      "scheduled_action.cc",
 | 
|      "scheduled_action.h",
 | 
|    ]
 | 
| +
 | 
| +  defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
 | 
| +
 | 
|    deps = [
 | 
|      "//base",
 | 
|      "//dart/runtime/bin:libdart_withcore",
 | 
| @@ -38,12 +110,14 @@ source_set("bindings") {
 | 
|      "//sky/engine/platform:platform",
 | 
|      "//sky/engine/tonic",
 | 
|      "//sky/engine/wtf",
 | 
| +    ":dart_io_no_secure_socket_bindings",
 | 
|      ":generated_bindings",
 | 
|      ":snapshot_cc",
 | 
|    ]
 | 
|    include_dirs = [
 | 
|      "..",
 | 
|      "$root_build_dir",
 | 
| +    rebase_path("//dart/runtime"),
 | 
|    ]
 | 
|  }
 | 
|  
 | 
| 
 |