Commit aa9125d2 authored by sdefresne's avatar sdefresne Committed by Commit bot

[iOS] Remove dependency third_party/WebKit on iOS.

Chrome on iOS now requires mojo for WebUI which has an optional dependency
on third_party/WebKit. Chrome on iOS cannot depends on third_party/WebKit,
so only enable those optional dependencies if target OS is not iOS.

Fixes the following build failures when building with clang Xcode (which
is only done by downstream release bots as we do not have capacity to run
it on each commit):
  error: unable to load plugin 'third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib': 'dlopen(third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib, 9): Symbol not found: __ZN4llvm8RegistryIN5clang15PluginASTActionEE4HeadE
    Referenced from: third_party/llvm-build/Release+Asserts/lib/libBlinkGCPlugin.dylib

To prevent further dependencies on third_party/WebKit to creep in change
third_party/WebKit/Source/{config.gyp,wtf/wtf.gyp} to not define any
target when target OS is iOS (in order to generate errors when running
"gclient runhooks").

This is similar to corresponding GN changes in issue
https://codereview.chromium.org/2004743002/.

BUG=616750

Review-Url: https://codereview.chromium.org/2036683002
Cr-Commit-Position: refs/heads/master@{#398272}
parent cccf9132
...@@ -237,32 +237,6 @@ ...@@ -237,32 +237,6 @@
'mojo_interface_bindings_cpp_sources', 'mojo_interface_bindings_cpp_sources',
], ],
}, },
{
# TODO(yzshen): crbug.com/617718 Consider moving this into blink.
# GN version: //mojo/public/cpp/bindings:wtf_support
'target_name': 'mojo_cpp_bindings_wtf_support',
'type': 'static_library',
'include_dirs': [
'..'
],
'sources': [
'public/cpp/bindings/array_traits_wtf.h',
'public/cpp/bindings/array_traits_wtf_vector.h',
'public/cpp/bindings/lib/string_traits_wtf.cc',
'public/cpp/bindings/lib/wtf_serialization.h',
'public/cpp/bindings/string_traits_wtf.h',
'public/cpp/bindings/wtf_array.h',
],
'dependencies': [
'mojo_cpp_bindings',
'../third_party/WebKit/Source/config.gyp:config',
'../third_party/WebKit/Source/wtf/wtf.gyp:wtf',
],
'export_dependent_settings': [
'mojo_cpp_bindings',
'../third_party/WebKit/Source/config.gyp:config',
],
},
{ {
# GN version: //mojo/message_pump # GN version: //mojo/message_pump
'target_name': 'mojo_message_pump_lib', 'target_name': 'mojo_message_pump_lib',
...@@ -406,19 +380,6 @@ ...@@ -406,19 +380,6 @@
], ],
'includes': [ 'mojom_bindings_generator.gypi' ], 'includes': [ 'mojom_bindings_generator.gypi' ],
}, },
{
'target_name': 'mojo_public_test_interfaces_mojom_blink',
'type': 'none',
'variables': {
'for_blink': 'true',
'mojom_typemaps': [
'public/cpp/bindings/tests/rect_blink.typemap',
'public/cpp/bindings/tests/test_native_types_blink.typemap',
],
'mojom_files': '<(mojo_public_test_interfaces_mojom_files)',
},
'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
},
{ {
# GN version: //mojo/public/interfaces/bindings/tests:test_interfaces # GN version: //mojo/public/interfaces/bindings/tests:test_interfaces
'target_name': 'mojo_public_test_interfaces', 'target_name': 'mojo_public_test_interfaces',
...@@ -434,22 +395,6 @@ ...@@ -434,22 +395,6 @@
'mojo_cpp_bindings', 'mojo_cpp_bindings',
], ],
}, },
{
# GN version: //mojo/public/interfaces/bindings/tests:test_interfaces_blink
'target_name': 'mojo_public_test_interfaces_blink',
'type': 'static_library',
'export_dependent_settings': [
'mojo_public_test_interfaces_mojom_blink',
'mojo_cpp_bindings',
],
'sources': [
'public/cpp/bindings/tests/pickled_struct_blink.cc',
],
'dependencies': [
'mojo_public_test_interfaces_mojom_blink',
'mojo_cpp_bindings',
],
},
{ {
'target_name': 'mojo_public_test_associated_interfaces_mojom', 'target_name': 'mojo_public_test_associated_interfaces_mojom',
'type': 'none', 'type': 'none',
...@@ -484,17 +429,6 @@ ...@@ -484,17 +429,6 @@
], ],
'includes': [ 'mojom_bindings_generator.gypi' ], 'includes': [ 'mojom_bindings_generator.gypi' ],
}, },
{
'target_name': 'mojo_public_test_wtf_types_blink',
'type': 'static_library',
'variables': {
'for_blink': 'true',
},
'sources': [
'public/interfaces/bindings/tests/test_wtf_types.mojom',
],
'includes': [ 'mojom_bindings_generator.gypi' ],
},
], ],
'conditions': [ 'conditions': [
['OS == "android"', { ['OS == "android"', {
...@@ -533,5 +467,75 @@ ...@@ -533,5 +467,75 @@
}, },
], ],
}], }],
['OS != "ios"', {
'targets': [
{
# TODO(yzshen): crbug.com/617718 Consider moving this into blink.
# GN version: //mojo/public/cpp/bindings:wtf_support
'target_name': 'mojo_cpp_bindings_wtf_support',
'type': 'static_library',
'include_dirs': [
'..'
],
'sources': [
'public/cpp/bindings/array_traits_wtf.h',
'public/cpp/bindings/array_traits_wtf_vector.h',
'public/cpp/bindings/lib/string_traits_wtf.cc',
'public/cpp/bindings/lib/wtf_serialization.h',
'public/cpp/bindings/string_traits_wtf.h',
'public/cpp/bindings/wtf_array.h',
],
'dependencies': [
'mojo_cpp_bindings',
'../third_party/WebKit/Source/config.gyp:config',
'../third_party/WebKit/Source/wtf/wtf.gyp:wtf',
],
'export_dependent_settings': [
'mojo_cpp_bindings',
'../third_party/WebKit/Source/config.gyp:config',
],
},
{
'target_name': 'mojo_public_test_interfaces_mojom_blink',
'type': 'none',
'variables': {
'for_blink': 'true',
'mojom_typemaps': [
'public/cpp/bindings/tests/rect_blink.typemap',
'public/cpp/bindings/tests/test_native_types_blink.typemap',
],
'mojom_files': '<(mojo_public_test_interfaces_mojom_files)',
},
'includes': [ 'mojom_bindings_generator_explicit.gypi' ],
},
{
# GN version: //mojo/public/interfaces/bindings/tests:test_interfaces_blink
'target_name': 'mojo_public_test_interfaces_blink',
'type': 'static_library',
'export_dependent_settings': [
'mojo_public_test_interfaces_mojom_blink',
'mojo_cpp_bindings',
],
'sources': [
'public/cpp/bindings/tests/pickled_struct_blink.cc',
],
'dependencies': [
'mojo_public_test_interfaces_mojom_blink',
'mojo_cpp_bindings',
],
},
{
'target_name': 'mojo_public_test_wtf_types_blink',
'type': 'static_library',
'variables': {
'for_blink': 'true',
},
'sources': [
'public/interfaces/bindings/tests/test_wtf_types.mojom',
],
'includes': [ 'mojom_bindings_generator.gypi' ],
},
],
}],
], ],
} }
...@@ -28,6 +28,15 @@ ...@@ -28,6 +28,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# #
{ {
'targets': [],
'conditions': [
# Normally target should exists unconditionally and only their content
# should be conditional. Those targets are intentionally only conditionally
# visible to make sure target using blink are not part of the iOS build (as
# iOS must not depends on blink). If you get an error about this target not
# existing, then you must make the target depending on blink condition on
# OS not being iOS.
['OS!="ios"', {
'variables': { 'variables': {
# If set to 1, doesn't compile debug symbols into webcore reducing the # If set to 1, doesn't compile debug symbols into webcore reducing the
# size of the binary and increasing the speed of gdb. gcc only. # size of the binary and increasing the speed of gdb. gcc only.
...@@ -92,13 +101,13 @@ ...@@ -92,13 +101,13 @@
}], }],
# Only enable the blink_gc_plugin when using clang and chrome plugins. # Only enable the blink_gc_plugin when using clang and chrome plugins.
['blink_gc_plugin==1 and clang==1 and clang_use_chrome_plugins==1', { ['blink_gc_plugin==1 and clang==1 and clang_use_chrome_plugins==1', {
'cflags': ['<!@(python <(DEPTH)/tools/clang/scripts/blink_gc_plugin_flags.py <(blink_gc_plugin_flags))'], 'cflags': ['<!@(python <(DEPTH)/tools/clang/scripts/blink_gc_plugin_flags.py target_os=<(OS) <(blink_gc_plugin_flags))'],
'xcode_settings': { 'xcode_settings': {
'OTHER_CFLAGS': ['<!@(python <(DEPTH)/tools/clang/scripts/blink_gc_plugin_flags.py <(blink_gc_plugin_flags))'], 'OTHER_CFLAGS': ['<!@(python <(DEPTH)/tools/clang/scripts/blink_gc_plugin_flags.py target_os=<(OS) <(blink_gc_plugin_flags))'],
}, },
'msvs_settings': { 'msvs_settings': {
'VCCLCompilerTool': { 'VCCLCompilerTool': {
'AdditionalOptions': ['<!@(python <(DEPTH)/tools/clang/scripts/blink_gc_plugin_flags.py <(blink_gc_plugin_flags))'], 'AdditionalOptions': ['<!@(python <(DEPTH)/tools/clang/scripts/blink_gc_plugin_flags.py target_os=<(OS) <(blink_gc_plugin_flags))'],
}, },
}, },
}], }],
...@@ -136,4 +145,6 @@ ...@@ -136,4 +145,6 @@
}, },
} }
], ],
}],
],
} }
...@@ -31,6 +31,15 @@ ...@@ -31,6 +31,15 @@
'../build/features.gypi', '../build/features.gypi',
'wtf.gypi', 'wtf.gypi',
], ],
'targets': [],
'conditions': [
# Normally target should exists unconditionally and only their content
# should be conditional. Those targets are intentionally only conditionally
# visible to make sure target using blink are not part of the iOS build (as
# iOS must not depends on blink). If you get an error about this target not
# existing, then you must make the target depending on blink condition on
# OS not being iOS.
['OS!="ios"', {
'targets': [ 'targets': [
{ {
# This target sets up defines and includes that are required by WTF and # This target sets up defines and includes that are required by WTF and
...@@ -145,5 +154,7 @@ ...@@ -145,5 +154,7 @@
}], }],
], ],
}, },
] ],
}],
],
} }
...@@ -23,6 +23,9 @@ for arg in sys.argv[1:]: ...@@ -23,6 +23,9 @@ for arg in sys.argv[1:]:
FLAGS += PREFIX + 'warn-unneeded-finalizer' FLAGS += PREFIX + 'warn-unneeded-finalizer'
elif arg.startswith('custom_clang_lib_path='): elif arg.startswith('custom_clang_lib_path='):
CLANG_LIB_PATH = arg[len('custom_clang_lib_path='):] CLANG_LIB_PATH = arg[len('custom_clang_lib_path='):]
elif arg == 'target_os=ios':
sys.stderr.write('error: blink is unsupported on iOS\n')
sys.exit(1)
if not sys.platform in ['win32', 'cygwin']: if not sys.platform in ['win32', 'cygwin']:
LIBSUFFIX = 'dylib' if sys.platform == 'darwin' else 'so' LIBSUFFIX = 'dylib' if sys.platform == 'darwin' else 'so'
......
...@@ -133,22 +133,6 @@ ...@@ -133,22 +133,6 @@
}, },
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ], 'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
}, },
{
'target_name': 'url_interfaces_mojom_for_blink',
'type': 'none',
'variables': {
'for_blink': 'true',
'mojom_files': [
'mojo/origin.mojom',
'mojo/url.mojom',
],
'mojom_typemaps': [
'../third_party/WebKit/Source/platform/mojo/KURL.typemap',
'../third_party/WebKit/Source/platform/mojo/SecurityOrigin.typemap',
],
},
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
},
{ {
# GN version: //url/mojo:url_mojom_gurl and //url/mojo:url_mojom_origin # GN version: //url/mojo:url_mojom_gurl and //url/mojo:url_mojom_origin
'target_name': 'url_mojom', 'target_name': 'url_mojom',
...@@ -162,19 +146,6 @@ ...@@ -162,19 +146,6 @@
'url_lib', 'url_lib',
], ],
}, },
{
# GN version: //url/mojo:url_mojom_gurl_blink and //url/mojo:url_mojom_origin_blink
'target_name': 'url_mojom_for_blink',
'type': 'static_library',
'export_dependent_settings': [
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
],
'dependencies': [
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
'url_interfaces_mojom_for_blink',
'url_lib',
],
},
{ {
# GN version: //url/mojo:test_url_mojom_gurl # GN version: //url/mojo:test_url_mojom_gurl
'target_name': 'url_test_interfaces_mojom', 'target_name': 'url_test_interfaces_mojom',
...@@ -193,25 +164,6 @@ ...@@ -193,25 +164,6 @@
'../mojo/mojo_public.gyp:mojo_cpp_bindings', '../mojo/mojo_public.gyp:mojo_cpp_bindings',
], ],
}, },
{
# GN version: //url/mojo:test_url_mojom_gurl_blink
'target_name': 'url_test_interfaces_mojom_for_blink',
'type': 'none',
'variables': {
'for_blink': 'true',
'mojom_files': [
'mojo/url_test.mojom',
],
'mojom_typemaps': [
'../third_party/WebKit/Source/platform/mojo/KURL.typemap',
'../third_party/WebKit/Source/platform/mojo/SecurityOrigin.typemap',
],
},
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
'dependencies': [
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
],
},
{ {
'target_name': 'url_test_mojom', 'target_name': 'url_test_mojom',
'type': 'static_library', 'type': 'static_library',
...@@ -264,6 +216,58 @@ ...@@ -264,6 +216,58 @@
}, },
], ],
}], }],
['OS!="ios"', {
'targets': [
{
'target_name': 'url_interfaces_mojom_for_blink',
'type': 'none',
'variables': {
'for_blink': 'true',
'mojom_files': [
'mojo/origin.mojom',
'mojo/url.mojom',
],
'mojom_typemaps': [
'../third_party/WebKit/Source/platform/mojo/KURL.typemap',
'../third_party/WebKit/Source/platform/mojo/SecurityOrigin.typemap',
],
},
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
},
{
# GN version: //url/mojo:url_mojom_gurl_blink and //url/mojo:url_mojom_origin_blink
'target_name': 'url_mojom_for_blink',
'type': 'static_library',
'export_dependent_settings': [
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
],
'dependencies': [
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
'url_interfaces_mojom_for_blink',
'url_lib',
],
},
{
# GN version: //url/mojo:test_url_mojom_gurl_blink
'target_name': 'url_test_interfaces_mojom_for_blink',
'type': 'none',
'variables': {
'for_blink': 'true',
'mojom_files': [
'mojo/url_test.mojom',
],
'mojom_typemaps': [
'../third_party/WebKit/Source/platform/mojo/KURL.typemap',
'../third_party/WebKit/Source/platform/mojo/SecurityOrigin.typemap',
],
},
'includes': [ '../mojo/mojom_bindings_generator_explicit.gypi' ],
'dependencies': [
'../mojo/mojo_public.gyp:mojo_cpp_bindings',
],
},
],
}],
['test_isolation_mode != "noop"', { ['test_isolation_mode != "noop"', {
'targets': [ 'targets': [
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment