blob: aef9c354081aaf4be035bdcf77cf599796619663 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/split_static_library.gni")
import("//build/config/chromecast_build.gni")
import("//third_party/WebKit/Source/bindings/bindings.gni")
import("//third_party/WebKit/Source/bindings/modules/v8/generated.gni")
import("//third_party/WebKit/Source/bindings/modules/v8/v8.gni")
import("//third_party/WebKit/Source/build/scripts/scripts.gni")
import("//third_party/WebKit/Source/modules/modules.gni")
import("//third_party/WebKit/Source/modules/modules_idl_files.gni")
visibility = [ "//third_party/WebKit/Source/*" ]
if (!is_component_build && is_win && is_official_build) {
# This target as a static library (for non-component builds) is >2GB for
# official builds on Windows. This causes linking fail. As a workaround,
# force using a split static library for this configuration.
modules_target_type = "split_static_library"
} else {
modules_target_type = "component"
}
config("modules_implementation") {
defines = [ "BLINK_MODULES_IMPLEMENTATION=1" ]
if (is_chromecast) {
defines += [
"BLINK_MSLOG=VLOG(2)",
"BLINK_SBLOG=VLOG(2)",
]
}
}
make_names("module_names") {
in_files = [ "indexeddb/IndexedDBNames.in" ]
outputs = [
"$blink_modules_output_dir/IndexedDBNames.cpp",
"$blink_modules_output_dir/IndexedDBNames.h",
]
deps = [] # Don't use default deps (otherwise it will be circular).
}
target(modules_target_type, "modules") {
output_name = "blink_modules"
if (modules_target_type == "split_static_library") {
split_count = 5
}
visibility = [] # Allow re-assignment of list.
visibility = [ "//third_party/WebKit/*" ]
sources = [
"ModulesInitializer.cpp",
"ModulesInitializer.h",
]
sources += generated_modules_dictionary_files
# Compile sources generated by module_names script.
sources += get_target_outputs(":module_names")
sources += bindings_modules_v8_files
sources += rebase_path(bindings_modules_generated_aggregate_files, ".", "//")
sources += rebase_path(bindings_modules_generated_union_type_files, ".", "//")
sources +=
rebase_path(bindings_modules_generated_partial_aggregate_files, ".", "//")
sources +=
rebase_path([ bindings_modules_generated_init_partial_interfaces_file ],
".",
"//")
configs += [
":modules_implementation",
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
"//build/config/compiler:no_size_t_to_int_warning",
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:non_test_config",
"//third_party/WebKit/Source:inside_blink",
]
deps = [
":make_modules_generated",
":module_names",
"//device/geolocation/public/interfaces:interfaces_blink",
"//third_party/WebKit/Source/bindings/modules:generated",
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/modules/accessibility",
"//third_party/WebKit/Source/modules/app_banner",
"//third_party/WebKit/Source/modules/audio_output_devices",
"//third_party/WebKit/Source/modules/background_sync",
"//third_party/WebKit/Source/modules/battery",
"//third_party/WebKit/Source/modules/beacon",
"//third_party/WebKit/Source/modules/bluetooth",
"//third_party/WebKit/Source/modules/broadcastchannel",
"//third_party/WebKit/Source/modules/budget",
"//third_party/WebKit/Source/modules/cachestorage",
"//third_party/WebKit/Source/modules/canvas",
"//third_party/WebKit/Source/modules/canvas2d",
"//third_party/WebKit/Source/modules/compositorworker",
"//third_party/WebKit/Source/modules/credentialmanager",
"//third_party/WebKit/Source/modules/crypto",
"//third_party/WebKit/Source/modules/csspaint",
"//third_party/WebKit/Source/modules/device_light",
"//third_party/WebKit/Source/modules/device_orientation",
"//third_party/WebKit/Source/modules/donottrack",
"//third_party/WebKit/Source/modules/encoding",
"//third_party/WebKit/Source/modules/encryptedmedia",
"//third_party/WebKit/Source/modules/fetch",
"//third_party/WebKit/Source/modules/filesystem",
"//third_party/WebKit/Source/modules/gamepad",
"//third_party/WebKit/Source/modules/geolocation",
"//third_party/WebKit/Source/modules/geolocation",
"//third_party/WebKit/Source/modules/imagebitmap",
"//third_party/WebKit/Source/modules/imagecapture",
"//third_party/WebKit/Source/modules/indexeddb",
"//third_party/WebKit/Source/modules/indexeddb",
"//third_party/WebKit/Source/modules/installedapp",
"//third_party/WebKit/Source/modules/mediacapturefromelement",
"//third_party/WebKit/Source/modules/mediarecorder",
"//third_party/WebKit/Source/modules/mediasession",
"//third_party/WebKit/Source/modules/mediasource",
"//third_party/WebKit/Source/modules/mediastream",
"//third_party/WebKit/Source/modules/navigatorcontentutils",
"//third_party/WebKit/Source/modules/netinfo",
"//third_party/WebKit/Source/modules/nfc",
"//third_party/WebKit/Source/modules/notifications",
"//third_party/WebKit/Source/modules/offscreencanvas",
"//third_party/WebKit/Source/modules/offscreencanvas2d",
"//third_party/WebKit/Source/modules/payments",
"//third_party/WebKit/Source/modules/peerconnection",
"//third_party/WebKit/Source/modules/permissions",
"//third_party/WebKit/Source/modules/plugins",
"//third_party/WebKit/Source/modules/presentation",
"//third_party/WebKit/Source/modules/push_messaging",
"//third_party/WebKit/Source/modules/quota",
"//third_party/WebKit/Source/modules/remoteplayback",
"//third_party/WebKit/Source/modules/screen_orientation",
"//third_party/WebKit/Source/modules/sensor",
"//third_party/WebKit/Source/modules/serviceworkers",
"//third_party/WebKit/Source/modules/speech",
"//third_party/WebKit/Source/modules/srcobject",
"//third_party/WebKit/Source/modules/storage",
"//third_party/WebKit/Source/modules/vibration",
"//third_party/WebKit/Source/modules/vr",
"//third_party/WebKit/Source/modules/wake_lock",
"//third_party/WebKit/Source/modules/webaudio",
"//third_party/WebKit/Source/modules/webdatabase",
"//third_party/WebKit/Source/modules/webgl",
"//third_party/WebKit/Source/modules/webmidi",
"//third_party/WebKit/Source/modules/webshare",
"//third_party/WebKit/Source/modules/websockets",
"//third_party/WebKit/Source/modules/webusb",
"//third_party/icu",
"//third_party/sqlite",
"//third_party/zlib",
]
if (is_win) {
cflags = [ "/wd4334" ] # Result of 32-bit shift implicitly converted to 64 bits.
}
if (remove_webcore_debug_symbols) {
configs -= [ "//build/config/compiler:default_symbols" ]
configs += [ "//build/config/compiler:no_symbols" ]
}
}
# GYP version: WebKit/Source/modules/modules.gyp:modules_testing
source_set("modules_testing") {
sources = [
"$bindings_modules_v8_output_dir/V8InternalsPartial.cpp",
"$bindings_modules_v8_output_dir/V8InternalsPartial.h",
"accessibility/testing/InternalsAccessibility.cpp",
"accessibility/testing/InternalsAccessibility.h",
"navigatorcontentutils/testing/InternalsNavigatorContentUtils.cpp",
"navigatorcontentutils/testing/InternalsNavigatorContentUtils.h",
"navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp",
"navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h",
"peerconnection/testing/InternalsRTCCertificate.cpp",
"peerconnection/testing/InternalsRTCCertificate.h",
"serviceworkers/testing/InternalsServiceWorker.cpp",
"serviceworkers/testing/InternalsServiceWorker.h",
"speech/testing/InternalsSpeechSynthesis.cpp",
"speech/testing/InternalsSpeechSynthesis.h",
"speech/testing/PlatformSpeechSynthesizerMock.cpp",
"speech/testing/PlatformSpeechSynthesizerMock.h",
"vibration/testing/InternalsVibration.cpp",
"vibration/testing/InternalsVibration.h",
"webaudio/testing/InternalsWebAudio.cpp",
"webaudio/testing/InternalsWebAudio.h",
]
configs += [
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:inside_blink",
]
deps = [
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/modules",
]
}
group("make_modules_generated") {
public_deps = [
":module_names",
"//third_party/WebKit/Source/bindings/modules:bindings_modules_generated",
"//third_party/WebKit/Source/core:core_event_interfaces",
]
}
source_set("unit_tests") {
testonly = true
sources = [
"accessibility/AXObjectTest.cpp",
"cachestorage/CacheTest.cpp",
"canvas/HTMLCanvasElementModuleTest.cpp",
"canvas2d/CanvasRenderingContext2DAPITest.cpp",
"canvas2d/CanvasRenderingContext2DTest.cpp",
"canvas2d/CanvasRenderingContext2DUsageTrackingTest.cpp",
"compositorworker/AnimationWorkletThreadTest.cpp",
"compositorworker/CompositorWorkerThreadTest.cpp",
"credentialmanager/PasswordCredentialTest.cpp",
"csspaint/PaintRenderingContext2DTest.cpp",
"csspaint/PaintWorkletTest.cpp",
"fetch/BodyStreamBufferTest.cpp",
"fetch/BytesConsumerForDataConsumerHandleTest.cpp",
"fetch/CompositeDataConsumerHandleTest.cpp",
"fetch/DataConsumerHandleTestUtil.cpp",
"fetch/DataConsumerHandleTestUtil.h",
"fetch/DataConsumerHandleUtilTest.cpp",
"fetch/DataConsumerTeeTest.cpp",
"fetch/FetchBlobDataConsumerHandleTest.cpp",
"fetch/FetchDataLoaderTest.cpp",
"fetch/FetchFormDataConsumerHandleTest.cpp",
"fetch/FetchResponseDataTest.cpp",
"fetch/ReadableStreamDataConsumerHandleTest.cpp",
"fetch/RequestTest.cpp",
"fetch/ResponseTest.cpp",
"filesystem/DOMFileSystemBaseTest.cpp",
"indexeddb/IDBKeyPathTest.cpp",
"indexeddb/IDBRequestTest.cpp",
"indexeddb/IDBTransactionTest.cpp",
"indexeddb/MockWebIDBDatabase.cpp",
"indexeddb/MockWebIDBDatabase.h",
"mediasession/MediaSessionTest.cpp",
"mediastream/MediaConstraintsTest.cpp",
"notifications/NotificationDataTest.cpp",
"notifications/NotificationResourcesLoaderTest.cpp",
"payments/AbortTest.cpp",
"payments/CompleteTest.cpp",
"payments/OnPaymentResponseTest.cpp",
"payments/PaymentAddressTest.cpp",
"payments/PaymentRequestDetailsTest.cpp",
"payments/PaymentRequestTest.cpp",
"payments/PaymentRequestUpdateEventTest.cpp",
"payments/PaymentResponseTest.cpp",
"payments/PaymentTestHelper.cpp",
"payments/PaymentTestHelper.h",
"payments/PaymentsValidatorsTest.cpp",
"peerconnection/RTCDataChannelTest.cpp",
"presentation/PresentationAvailabilityTest.cpp",
"presentation/PresentationReceiverTest.cpp",
"push_messaging/PushManagerTest.cpp",
"push_messaging/PushMessageDataTest.cpp",
"serviceworkers/ServiceWorkerContainerTest.cpp",
"webaudio/AudioBasicProcessorHandlerTest.cpp",
"webaudio/ConvolverNodeTest.cpp",
"webaudio/DynamicsCompressorNodeTest.cpp",
"webaudio/ScriptProcessorNodeTest.cpp",
"webaudio/StereoPannerNodeTest.cpp",
"webdatabase/QuotaTrackerTest.cpp",
"websockets/DOMWebSocketTest.cpp",
"websockets/DocumentWebSocketChannelTest.cpp",
]
configs += [
"//third_party/WebKit/Source:config",
"//third_party/WebKit/Source:inside_blink",
]
deps = [
":modules",
":modules_testing",
"//skia",
"//testing/gmock",
"//testing/gtest",
"//third_party/WebKit/Source/core",
"//third_party/WebKit/Source/wtf",
"//v8",
]
}