Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1764)

Unified Diff: sky/engine/bindings/BUILD.gn

Issue 1107803002: Add Observatory to sky dart_controller (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sky/engine/bindings/BUILD.gn
diff --git a/sky/engine/bindings/BUILD.gn b/sky/engine/bindings/BUILD.gn
index 0e8edf2363ecfa6347a482d54aa6f1a519f830db..5e7ad16a33d74e0f2022b4dca772961cb83ba114 100644
--- a/sky/engine/bindings/BUILD.gn
+++ b/sky/engine/bindings/BUILD.gn
@@ -5,6 +5,83 @@
import("//sky/engine/bindings/bindings.gni")
import("//sky/engine/core/core.gni")
+io_impl_sources_gypi =
+ exec_script("../../../dart/tools/gypi_to_gn.py",
eseidel 2015/05/05 23:18:10 Instead of making this relative, rebase_path('//fu
+ [ 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",
+ "*dbg*",
+ "builtin.cc",
+ "builtin_natives.cc",
+ "builtin_gen_snapshot.cc",
+ ]
+ 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",
eseidel 2015/05/05 23:18:10 It's still a bit odd to have these paths in //sky
+ "//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",
+ "//dart/runtime/bin/builtin_nolib.cc",
+ "//dart/runtime/bin/builtin_natives.cc",
+ ]
+
+ sources += [
+ "dart_io.cc",
+ "dart_io.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 +107,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 +118,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"),
]
}

Powered by Google App Engine
This is Rietveld 408576698