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

Unified Diff: runtime/bin/bin.gypi

Issue 1839463002: Really remove io support when dart:io is unsupported. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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: runtime/bin/bin.gypi
diff --git a/runtime/bin/bin.gypi b/runtime/bin/bin.gypi
index e30b746c8e0d006c3a788a15c4de6b3a72c932da..da8354e36ec11e994fea4be689e77193b5b202dc 100644
--- a/runtime/bin/bin.gypi
+++ b/runtime/bin/bin.gypi
@@ -145,6 +145,73 @@
['exclude', '_test\\.(cc|h)$'],
],
'conditions': [
+ ['dart_io_support==0', {
+ 'defines': [
+ 'DART_IO_DISABLED',
+ ],
+ }],
+ ['OS=="win"', {
+ 'sources/' : [
+ ['exclude', 'fdutils.h'],
+ ],
+ # TODO(antonm): fix the implementation.
+ # Current implementation accepts char* strings
+ # and therefore fails to compile once _UNICODE is
+ # enabled. That should be addressed using -A
+ # versions of functions and adding necessary conversions.
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_configuration_attributes': {
+ 'CharacterSet': '0',
+ },
+ },
+ },
+ }],
+ ['OS=="linux"', {
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ ],
+ },
+ }],
+ ['OS=="android"', {
+ 'link_settings': {
+ 'libraries': [
+ '-ldl',
+ ],
+ },
+ }],
+ ],
+ },
+ # This is the same as libdart_builtin, but the io support libraries are
+ # never disabled, even when dart_io_support==0. This is so that it can
+ # still be usefully linked into gen_snapshot.
+ {
+ 'target_name': 'libdart_builtin_no_disable',
+ 'type': 'static_library',
+ 'toolsets':['host'],
+ 'dependencies': [
+ 'generate_builtin_cc_file#host',
+ 'generate_io_cc_file#host',
+ 'generate_io_patch_cc_file#host',
+ ],
+ 'include_dirs': [
+ '..',
+ ],
+ 'sources': [
+ 'log_android.cc',
+ 'log_linux.cc',
+ 'log_macos.cc',
+ 'log_win.cc',
+ ],
+ 'includes': [
+ 'builtin_impl_sources.gypi',
+ '../platform/platform_sources.gypi',
+ ],
+ 'sources/': [
+ ['exclude', '_test\\.(cc|h)$'],
+ ],
+ 'conditions': [
['OS=="win"', {
'sources/' : [
['exclude', 'fdutils.h'],
@@ -227,7 +294,7 @@
'conditions': [
['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', {
'dependencies': [
- '../third_party/boringssl/boringssl_dart.gyp:boringssl',
+ '../third_party/boringssl/boringssl_dart.gyp:boringssl',
],
}],
['dart_io_secure_socket==0 or dart_io_support==0', {
@@ -300,15 +367,80 @@
'dependencies': [
'bin/zlib.gyp:zlib_dart',
],
+ }, { # dart_io_support == 0
+ 'defines': [
+ 'DART_IO_DISABLED',
+ 'DART_IO_SECURE_SOCKET_DISABLED',
+ ],
+ }],
+ ['dart_io_secure_socket==0', {
+ 'defines': [
+ 'DART_IO_SECURE_SOCKET_DISABLED'
+ ],
}],
['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', {
'dependencies': [
'../third_party/boringssl/boringssl_dart.gyp:boringssl',
],
}],
- ['dart_io_secure_socket==0 or dart_io_support==0', {
+ ['OS=="win"', {
+ 'link_settings': {
+ 'libraries': [ '-liphlpapi.lib' ],
+ },
+ # TODO(antonm): fix the implementation.
+ # Current implementation accepts char* strings
+ # and therefore fails to compile once _UNICODE is
+ # enabled. That should be addressed using -A
+ # versions of functions and adding necessary conversions.
+ 'configurations': {
+ 'Common_Base': {
+ 'msvs_configuration_attributes': {
+ 'CharacterSet': '0',
+ },
+ },
+ },
+ }],
+ ['OS=="mac"', {
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+ '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework',
+ '$(SDKROOT)/System/Library/Frameworks/Security.framework',
+ ],
+ },
+ }],
+ ],
+ },
+ # This is the same as libdart_io, but the io support libraries are
+ # never disabled, even when dart_io_support==0. This is so that it can
+ # still be usefully linked into gen_snapshot.
+ {
+ 'target_name': 'libdart_io_no_disable',
+ 'type': 'static_library',
+ 'toolsets': ['host'],
+ 'include_dirs': [
+ '..',
+ '../../third_party',
+ ],
+ 'includes': [
+ 'io_impl_sources.gypi',
+ ],
+ 'sources': [
+ 'io_natives.h',
+ 'io_natives.cc',
+ ],
+ 'dependencies': [
+ 'bin/zlib.gyp:zlib_dart',
+ ],
+ 'conditions': [
+ ['dart_io_support==0 or dart_io_secure_socket==0', {
'defines': [
- 'DART_IO_SECURE_SOCKET_DISABLED'
+ 'DART_IO_SECURE_SOCKET_DISABLED',
+ ],
+ }],
+ ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', {
+ 'dependencies': [
+ '../third_party/boringssl/boringssl_dart.gyp:boringssl',
],
}],
['OS=="win"', {
@@ -377,9 +509,11 @@
'dependencies': [
'generate_resources_cc_file#host',
'generate_observatory_assets_cc_file#host',
- 'libdart_nosnapshot',
- 'libdart_builtin',
- 'libdart_io',
+ 'libdart_nosnapshot#host',
+ # If io is disabled for the VM, we still need it for gen snapshot, so
+ # use libdart_builtin and libdart_io that still have io enabled.
+ 'libdart_builtin_no_disable#host',
+ 'libdart_io_no_disable#host',
],
'include_dirs': [
'..',
@@ -547,6 +681,7 @@
'target_name': 'dart_product',
'type': 'executable',
'dependencies': [
+ 'bin/zlib.gyp:zlib_dart',
'libdart',
'libdart_builtin',
'libdart_io',
@@ -560,13 +695,13 @@
],
'sources': [
'main.cc',
+ 'builtin.h',
'builtin_common.cc',
'builtin_natives.cc',
'builtin_nolib.cc',
- 'builtin.h',
'io_natives.h',
- 'snapshot_empty.cc',
'observatory_assets_empty.cc',
+ 'snapshot_empty.cc',
],
'conditions': [
['OS=="win"', {
@@ -581,13 +716,14 @@
'target_name': 'dart',
'type': 'executable',
'dependencies': [
+ 'bin/zlib.gyp:zlib_dart',
+ 'build_observatory#host',
+ 'generate_observatory_assets_cc_file#host',
+ 'generate_resources_cc_file#host',
+ 'generate_snapshot_file#host',
'libdart',
'libdart_builtin',
'libdart_io',
- 'build_observatory#host',
- 'generate_snapshot_file#host',
- 'generate_resources_cc_file#host',
- 'generate_observatory_assets_cc_file#host',
],
'include_dirs': [
'..',
@@ -595,16 +731,16 @@
],
'sources': [
'main.cc',
+ 'builtin.h',
'builtin_common.cc',
'builtin_natives.cc',
'builtin_nolib.cc',
- 'builtin.h',
'io_natives.h',
'vmservice_impl.cc',
'vmservice_impl.h',
- '<(snapshot_cc_file)',
- '<(resources_cc_file)',
'<(observatory_assets_cc_file)',
+ '<(resources_cc_file)',
+ '<(snapshot_cc_file)',
],
'conditions': [
['OS=="win"', {
@@ -636,30 +772,29 @@
'target_name': 'dart_noopt',
'type': 'executable',
'dependencies': [
- 'libdart_noopt',
- 'libdart_builtin',
- 'libdart_io',
'build_observatory#host',
- 'generate_snapshot_file#host',
- 'generate_resources_cc_file#host',
'generate_observatory_assets_cc_file#host',
+ 'generate_resources_cc_file#host',
+ 'generate_snapshot_file#host',
+ 'libdart_builtin',
+ 'libdart_io',
+ 'libdart_noopt',
],
'include_dirs': [
'..',
- '../../third_party/', # Zlib
],
'sources': [
'main.cc',
+ 'builtin.h',
'builtin_common.cc',
'builtin_natives.cc',
'builtin_nolib.cc',
- 'builtin.h',
'io_natives.h',
'vmservice_impl.cc',
'vmservice_impl.h',
- '<(snapshot_cc_file)',
- '<(resources_cc_file)',
'<(observatory_assets_cc_file)',
+ '<(resources_cc_file)',
+ '<(snapshot_cc_file)',
],
'defines': [
'DART_PRECOMPILER',
@@ -693,12 +828,13 @@
'target_name': 'dart_precompiled_runtime',
'type': 'executable',
'dependencies': [
- 'libdart_precompiled_runtime',
- 'libdart_builtin',
- 'libdart_io',
+ 'bin/zlib.gyp:zlib_dart',
'build_observatory#host',
- 'generate_resources_cc_file#host',
'generate_observatory_assets_cc_file#host',
+ 'generate_resources_cc_file#host',
+ 'libdart_builtin',
+ 'libdart_io',
+ 'libdart_precompiled_runtime',
],
'include_dirs': [
'..',
@@ -706,16 +842,16 @@
],
'sources': [
'main.cc',
+ 'builtin.h',
'builtin_common.cc',
'builtin_natives.cc',
'builtin_nolib.cc',
- 'builtin.h',
'io_natives.h',
+ 'snapshot_empty.cc',
'vmservice_impl.cc',
'vmservice_impl.h',
- 'snapshot_empty.cc',
- '<(resources_cc_file)',
'<(observatory_assets_cc_file)',
+ '<(resources_cc_file)',
],
'defines': [
'DART_PRECOMPILED_RUNTIME',
@@ -742,22 +878,23 @@
'type': 'executable',
'toolsets':['host'],
'dependencies': [
- 'libdart_nosnapshot',
+ 'generate_resources_cc_file#host',
'libdart_builtin',
'libdart_io',
- 'generate_resources_cc_file#host',
+ 'libdart_nosnapshot',
],
'include_dirs': [
'..',
- '../../third_party/', # Zlib
],
'sources': [
'main.cc',
- 'builtin_common.cc',
- 'builtin_natives.cc',
'builtin.cc',
'builtin.h',
+ 'builtin_common.cc',
+ 'builtin_natives.cc',
'io_natives.h',
+ 'observatory_assets_empty.cc',
+ 'snapshot_empty.cc',
'vmservice_impl.cc',
'vmservice_impl.h',
# Include generated source files.
@@ -765,8 +902,6 @@
'<(io_cc_file)',
'<(io_patch_cc_file)',
'<(resources_cc_file)',
- 'observatory_assets_empty.cc',
- 'snapshot_empty.cc',
],
'defines': [
'DART_NO_SNAPSHOT',

Powered by Google App Engine
This is Rietveld 408576698