blob: 277b8f375ecfc25fd2d3770c985b01a47572a96c [file] [log] [blame]
{
'variables': {
'global_dart_output_dir': '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/dart',
'dart_dir': '../../../../../../dart',
'dart_lib_dir': '<(dart_dir)/sdk/lib',
'resources_dir': 'resources',
'build_dir': '../../../build',
'core_dir': '../../../core',
'modules_dir': '../../../modules',
'core_gyp_dir': '<(core_dir)',
'scripts_dir': '../../dart/gyp/scripts',
'bindings_core_dart_stamp_file': '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/core/dart/core.stamp',
# Share with Source/core/core.gyp somehow.
# Note: that SVG exclusions are not applicable for Dartium.
'bindings_idl_files': [
'<@(core_idl_files)',
'<@(core_dependency_idl_files)',
'<@(modules_idl_files)',
'<@(modules_dependency_idl_files)',
'<(modules_dir)/geolocation/NavigatorGeolocation.idl',
# Add some interfaces which are missing for JS, but necessary for Dart.
'<(core_dir)/svg/SVGFilterPrimitiveStandardAttributes.idl',
'<(core_dir)/svg/SVGFitToViewBox.idl',
'<(core_dir)/svg/SVGTests.idl',
],
'bindings_idl_files!': [
# Custom bindings in bindings/core/v8/custom exist for these.
'<(core_dir)/dom/EventListener.idl',
'<(core_dir)/page/AbstractView.idl',
# FIXME: I don't know why these are excluded, either.
# Someone (me?) should figure it out and add appropriate comments.
'<(core_dir)/css/CSSUnknownRule.idl',
],
'enable_dart_native_extensions%': '<(enable_dart_native_extensions)',
'additional_webcore_include_dirs': [
'.',
'custom',
'<(dart_dir)runtime',
'<(dart_dir)runtime/include',
'<(SHARED_INTERMEDIATE_DIR)/blink/bindings/dart',
],
},
'targets': [
{
'target_name': 'dart_debug_hooks_source',
'type': 'none',
'actions': [
{
'action_name': 'generateDartDebugHooksSource',
'inputs': [
'DartDebugHooks.js',
],
'outputs': [
'<(SHARED_INTERMEDIATE_DIR)/blink/DartDebugHooksSource.h',
],
'action': [
'python',
'<(build_dir)/scripts/xxd.py',
'DartDebugHooksSource_js',
'<@(_inputs)',
'<@(_outputs)'
],
'message': 'Generating DartDebugHooksSource.h from DartDebugHooks.js',
},
]
},
{
'target_name': 'dart_snapshot',
'type': 'none',
'hard_dependency': 1,
'dependencies': [
'<(dart_dir)/runtime/dart-runtime.gyp:gen_snapshot#host',
],
'variables': {
'idls_list_temp_file': '<|(idls_list_temp_file.tmp <@(bindings_idl_files))',
'output_path': '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/dart',
'dart_html_lib_dir': '<(dart_dir)/tools/dom',
'dart_html_lib_deps': '<!(python <@(scripts_dir)/dart_html_lib_deps.py <(dart_html_lib_dir))',
},
'sources': [
# '<!@(cat <(idls_list_temp_file))',
],
'actions': [
{
'action_name': 'build_dart_snapshot',
'variables': {
'output_path': '<(SHARED_INTERMEDIATE_DIR)/blink/bindings/dart',
'pure_libs': [
'<(dart_lib_dir)/_blink/dartium/_blink_dartium.dart',
'<(dart_dir)/runtime/bin/vmserviceio_dartium.dart',
'<(dart_lib_dir)/html/html_common/html_common.dart',
'<(dart_lib_dir)/js/dartium/js_dartium.dart',
'<(dart_lib_dir)/html/dartium/html_dartium.dart',
'<(dart_lib_dir)/indexed_db/dartium/indexed_db_dartium.dart',
'<(dart_lib_dir)/svg/dartium/svg_dartium.dart',
'<(dart_lib_dir)/web_audio/dartium/web_audio_dartium.dart',
'<(dart_lib_dir)/web_gl/dartium/web_gl_dartium.dart',
'<(dart_lib_dir)/web_sql/dartium/web_sql_dartium.dart',
],
},
'inputs': [
'<@(scripts_dir)/build_dart_snapshot.py',
'<(resources_dir)/DartSnapshot.bytes.template',
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX)',
# FIXME: libs below can consist of more than a single file. Ideally, we should
# track that somehow.
# FIXME: We need blink_dartium.dart here.
'<@(pure_libs)',
'<@(dart_html_lib_deps)',
],
'outputs': [
'<(output_path)/DartSnapshot.bytes',
],
'action': [
'python',
'<@(scripts_dir)/build_dart_snapshot.py',
'<(dart_dir)',
'<(resources_dir)/DartSnapshot.bytes.template',
'<(output_path)',
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX)',
'<@(pure_libs)',
],
},
],
},
],
}