blob: 4c1f8904558fbe3f83ca4dfbcef61d1d2d871a7a [file] [log] [blame]
# Copyright (c) 2013 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.
# This is the root build file for GN. GN will start processing by loading this
# file, and recursively load all dependencies until all dependencies are either
# resolved or known not to exist (which will cause the build to fail). So if
# you add a new build file, there must be some path of dependencies from this
# file to your new one or GN won't know about it.
import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//build/util/generate_wrapper.gni")
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/media/router/features.gni")
import("//components/nacl/features.gni")
import("//device/vr/buildflags/buildflags.gni")
import("//extensions/buildflags/buildflags.gni")
import("//gpu/vulkan/features.gni")
import("//media/gpu/args.gni")
import("//media/media_options.gni")
import("//remoting/remoting_enable.gni")
import("//third_party/openh264/openh264_args.gni")
import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
import("//ui/base/ui_features.gni")
import("//ui/gl/features.gni")
import("//ui/ozone/ozone.gni")
import("//ui/webui/webui_features.gni")
import("//v8/gni/snapshot_toolchain.gni")
import("//v8/gni/v8.gni")
if (is_android) {
import("//build/config/android/config.gni")
}
declare_args() {
# A list of extra dependencies to add to the root target. This allows a
# checkout to add additional targets without explicitly changing any checked-
# in files.
root_extra_deps = []
}
if (is_official_build) {
# An official (maximally optimized!) component (optimized for build times)
# build doesn't make sense and usually doesn't work.
assert(!is_component_build)
}
# This file defines the following two main targets:
#
# "gn_all" is used to create explicit dependencies from the root BUILD.gn to
# each top-level component that we wish to include when building everything via
# "all". This is required since the set of targets built by "all" is determined
# automatically based on reachability from the root BUILD.gn (for details, see
# crbug.com/503241). Builders should typically use "all", or list targets
# explicitly, rather than relying on "gn_all".
#
# "gn_visibility": targets that are normally not visible to top-level targets,
# but are built anyway by "all". Since we don't want any such targets, we have
# this placeholder to make sure hidden targets that aren't otherwise depended
# on yet are accounted for.
group("gn_all") {
testonly = true
deps = [
":gn_visibility",
"//base:base_perftests",
"//base:base_unittests",
"//base/util:base_util_unittests",
"//chrome/installer",
"//chrome/updater",
"//components:components_unittests",
"//components/gc:gc_unittests",
"//components/gwp_asan:gwp_asan_unittests",
"//net:net_unittests",
"//services:services_unittests",
"//services/service_manager/public/cpp",
"//skia:skia_unittests",
"//sql:sql_unittests",
"//third_party/flatbuffers:flatbuffers_unittests",
"//tools/binary_size:binary_size_trybot_py",
"//tools/ipc_fuzzer:ipc_fuzzer_all",
"//tools/metrics:metrics_metadata",
"//ui/base:ui_base_unittests",
"//ui/color:color_unittests",
"//ui/gfx:gfx_unittests",
"//url:url_unittests",
]
if (!is_android && !is_chromecast) {
deps += [
"//crypto:crypto_unittests",
"//google_apis/gcm:gcm_unit_tests",
]
}
if (closure_compile) {
deps += [ ":webui_closure_compile" ]
}
if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
deps += [
"//chrome",
"//chrome/browser/ui/color:dump_colors",
"//chrome/test:browser_tests",
"//chrome/test:interactive_ui_tests",
"//chrome/test:sync_integration_tests",
"//chrome/test/chromedriver:chromedriver_unittests",
"//components/subresource_filter/tools:subresource_filter_tools",
"//components/zucchini:zucchini",
"//components/zucchini:zucchini_unittests",
"//gpu/gles2_conform_support:gles2_conform_test",
"//gpu/khronos_glcts_support:khronos_glcts_test",
"//jingle:jingle_unittests",
"//net:hpack_example_generator",
"//ppapi:ppapi_unittests",
"//ppapi/examples/2d",
"//ppapi/examples/audio",
"//ppapi/examples/audio_input",
"//ppapi/examples/crxfs",
"//ppapi/examples/enumerate_devices",
"//ppapi/examples/file_chooser",
"//ppapi/examples/flash_topmost",
"//ppapi/examples/font",
"//ppapi/examples/gamepad",
"//ppapi/examples/gles2",
"//ppapi/examples/gles2_spinning_cube",
"//ppapi/examples/ime",
"//ppapi/examples/input",
"//ppapi/examples/media_stream_audio",
"//ppapi/examples/media_stream_video",
"//ppapi/examples/mouse_cursor",
"//ppapi/examples/mouse_lock",
"//ppapi/examples/printing",
"//ppapi/examples/scaling",
"//ppapi/examples/scripting",
"//ppapi/examples/stub",
"//ppapi/examples/threading",
"//ppapi/examples/url_loader",
"//ppapi/examples/video_capture",
"//ppapi/examples/video_decode",
"//ppapi/examples/video_encode",
"//printing:printing_unittests",
"//third_party/SPIRV-Tools/src:SPIRV-Tools",
"//third_party/SPIRV-Tools/src/test/fuzzers",
"//third_party/cacheinvalidation:cacheinvalidation_unittests",
"//third_party/pdfium/samples:pdfium_test",
"//tools/perf/clear_system_cache",
"//tools/polymer:polymer_tools_python_unittests",
"//ui/accessibility:accessibility_perftests",
"//ui/accessibility:accessibility_unittests",
"//ui/accessibility/extensions:extension_tests",
"//ui/accessibility/extensions:extensions",
]
}
if (!is_ios) {
deps += [
"//cc:cc_unittests",
"//components/policy:policy_templates",
"//components/ui_devtools/viz",
"//components/url_formatter/tools:format_url",
"//components/viz:viz_perftests",
"//components/viz:viz_unittests",
"//content/shell:content_shell",
"//content/test:content_browsertests",
"//content/test:content_perftests",
"//content/test:content_unittests",
"//gpu:gpu_benchmark",
"//gpu:gpu_unittests",
"//ipc:ipc_tests",
"//media:media_unittests",
"//media/midi:midi_unittests",
"//media/mojo:media_mojo_unittests",
"//mojo",
"//mojo:mojo_unittests",
"//net:net_perftests",
"//storage:storage_unittests",
"//third_party/angle/src/tests:angle_end2end_tests",
"//third_party/angle/src/tests:angle_unittests",
"//third_party/blink/common:blink_common_unittests",
"//third_party/blink/renderer/controller:blink_unittests",
"//third_party/blink/renderer/platform:blink_platform_unittests",
"//third_party/blink/renderer/platform/heap:blink_heap_unittests",
"//third_party/blink/renderer/platform/wtf:wtf_unittests",
"//tools/imagediff",
"//ui/display:display_unittests",
"//ui/events:events_unittests",
"//ui/gl:gl_unittests",
"//ui/latency:latency_unittests",
"//ui/native_theme:native_theme_unittests",
"//ui/touch_selection:ui_touch_selection_unittests",
"//url/ipc:url_ipc_unittests",
"//v8:gn_all",
]
}
if (is_win || (is_linux && !is_chromeos) || is_android) {
deps += [
"//weblayer/shell:weblayer_shell",
"//weblayer/test:weblayer_browsertests",
]
if (is_android) {
deps += [ "//weblayer/browser/android/javatests:weblayer_instrumentation_test_apk" ]
}
}
if (!is_ios && !is_android) {
deps += [
"//components/cronet:cronet_tests",
"//components/cronet:cronet_unittests",
"//components/viz/demo:viz_demo",
]
}
if (enable_openscreen) {
deps += [ "//chrome/browser/media/router:openscreen_unittests" ]
}
if (!is_ios && !is_fuchsia) {
deps += [
"//chrome/test:telemetry_perf_unittests",
"//chrome/test:unit_tests",
"//components:components_browsertests",
"//device:device_unittests",
"//google_apis/gcm:mcs_probe",
"//media/capture:capture_unittests",
"//media/cast:cast_unittests",
"//third_party/angle/src/tests:angle_white_box_tests",
"//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
]
} else if (is_ios) {
deps += [
"//ios:all",
"//third_party/crashpad/crashpad:crashpad_tests",
]
} else if (is_fuchsia) {
deps += [
":d8_fuchsia",
"//fuchsia:gn_all",
"//headless:headless_non_renderer",
]
}
deps += root_extra_deps
if (enable_extensions) {
deps += [
"//extensions:extensions_browsertests",
"//extensions:extensions_unittests",
"//extensions/shell:app_shell_unittests",
]
# TODO(crbug.com/981112): This target is failing to compile consistently in
# coverage build, remove this condition when the bug is fixed.
if (!use_clang_coverage) {
deps += [ "//extensions/browser/api/declarative_net_request/filter_list_converter" ]
}
}
if (enable_remoting) {
deps += [ "//remoting:remoting_all" ]
}
if (toolkit_views) {
deps += [
"//ui/views:views_unittests",
"//ui/views/examples:views_examples_exe",
"//ui/views/examples:views_examples_with_content_exe",
]
}
if (use_aura) {
deps += [
"//ui/aura:aura_demo",
"//ui/aura:aura_unittests",
"//ui/wm:wm_unittests",
]
}
if (use_ozone) {
deps += [
"//ui/ozone",
"//ui/ozone:ozone_unittests",
"//ui/ozone/demo",
"//ui/ozone/gl:ozone_gl_unittests",
]
if (ozone_platform_x11) {
deps += [ "//ui/ozone:ozone_x11_unittests" ]
}
}
if (use_x11 || ozone_platform_x11) {
deps += [ "//tools/xdisplaycheck" ]
}
if (is_win) {
deps += [
"//chrome/credential_provider",
"//chrome/credential_provider/test:gcp_unittests",
]
}
if (is_win && (target_cpu == "x86" || target_cpu == "x64")) {
deps += [ "//chrome/browser/browser_switcher/bho:browser_switcher_dlls" ]
}
if (is_win || is_linux) {
deps += [
"//tools/traffic_annotation/auditor:traffic_annotation_auditor",
"//tools/traffic_annotation/auditor:traffic_annotation_auditor_unittests",
]
}
if (is_mac) {
deps += [ "//chrome/installer/gcapi_mac:gcapi_example" ]
}
if (is_android) {
deps += [
"//base:base_junit_tests",
"//base/android/jni_generator:jni_generator_tests",
"//base/android/linker:chromium_android_linker",
"//build/android/gyp/test:hello_world",
"//build/android/stacktrace:java_deobfuscate",
"//build/config/android/test/proto:test_build_protos",
"//chrome/android/webapk/shell_apk:maps_go_webapk",
"//chrome/android/webapk/shell_apk:webapk",
"//chrome/android/webapk/shell_apk/prepare_upload_dir:prepare_webapk_shell_upload_dir",
"//chrome/test:android_browsertests",
"//components/embedder_support/android:components_embedder_support_junit_tests",
"//components/permissions/android:components_permissions_junit_tests",
"//components/policy/android:components_policy_junit_tests",
"//components/signin/core/browser/android:components_signin_junit_tests",
"//content/public/android:content_junit_tests",
"//content/shell/android:content_shell_apk",
"//device:device_junit_tests",
"//media/gpu:video_decode_accelerator_unittest",
"//net/android:net_junit_tests",
"//services:service_junit_tests",
"//testing/android/junit:junit_unit_tests",
"//third_party/catapult/devil",
"//third_party/smhasher:murmurhash3",
"//tools/android:android_tools",
"//tools/android:memconsumer",
"//tools/android:push_apps_to_background",
"//tools/android/audio_focus_grabber:audio_focus_grabber_apk",
"//tools/android/customtabs_benchmark:customtabs_benchmark_apk",
"//tools/android/errorprone_plugin:errorprone_plugin_java",
"//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk",
"//ui/android:ui_junit_tests",
"//weblayer/public/java:client_aar",
"//weblayer/shell/android:weblayer_shell_apk",
"//weblayer/shell/android:weblayer_support_apk",
]
deps -= [
"//net:net_perftests",
"//url:url_unittests",
]
if (!is_component_build) {
deps += [
"//components/cronet/android:cronet_package_android",
"//components/cronet/android:cronet_perf_test_apk",
"//components/cronet/android:cronet_sample_apk",
"//components/cronet/android:cronet_sample_test_apk",
"//components/cronet/android:cronet_test_instrumentation_apk",
"//components/cronet/android:cronet_unittests_android",
]
}
if (!is_chromecast) {
deps += [
"//android_webview:empty_group",
"//android_webview/test",
"//android_webview/tools/automated_ui_tests:webview_ui_test_app",
"//android_webview/tools/system_webview_shell",
"//android_webview/tools/webview_log_verbosifier:webview_log_verbosifier_apk",
"//chrome/android:chrome_junit_tests",
"//chrome/android:chrome_public_apk",
"//chrome/android:chrome_public_test_apk",
"//chrome/android/features/media_router:media_router_junit_tests",
"//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
"//content/shell/android:content_shell_test_apk",
"//third_party/custom_tabs_client:custom_tabs_client_example_apk",
]
}
if (enable_chrome_android_internal) {
deps += [ "//clank" ]
}
if (public_android_sdk) {
deps += [ "//chrome/android/monochrome:monochrome_apk_checker" ]
}
}
# NOTE: The following should really be 'is_android', but the fuzzing build
# seems currently broken for this platform at the moment, and the
# corresponding code build and works on Linux unmodified.
# See instructions in the corresponding BUILD.gn.
if (is_linux) {
deps +=
[ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ]
}
if (is_linux || is_chromeos) {
# This is only used by ChromeOS, but we want maximal fuzzer coverage, so
# run it under linux too.
deps += [
"//third_party/minizip:minizip_compress_fuzzer",
"//third_party/minizip:minizip_uncompress_fuzzer",
]
}
if (is_linux || is_android) {
deps += [
"//third_party/breakpad:breakpad_unittests",
"//third_party/breakpad:core-2-minidump",
"//third_party/breakpad:generate_test_dump",
"//third_party/breakpad:minidump-2-core",
"//tools/dump_process_memory:dump_process",
]
}
if (is_chromeos) {
deps += [
"//ash:ash_shell_with_content",
"//ash:ash_unittests",
"//ash/app_list:app_list_demo",
"//ash/app_list:app_list_unittests",
"//ash/keyboard/ui:keyboard_unittests",
"//chrome/test:usage_time_limit_unittests",
"//chromeos:chromeos_unittests",
"//chromeos/components:chromeos_components_unittests",
"//chromeos/components/proximity_auth:proximity_auth_unittests",
"//components/session_manager/core",
"//ui/chromeos:ui_chromeos_unittests",
]
}
if (is_chromeos || is_mac || is_win) {
deps += [
"//rlz:rlz_id",
"//rlz:rlz_lib",
"//rlz:rlz_unittests",
]
}
if (is_linux) {
# The following are definitely linux-only.
deps += [
"//chrome:xdg_mime",
"//net:disk_cache_memory_test",
"//net:quic_client",
"//net:quic_server",
"//sandbox/linux:chrome_sandbox",
"//sandbox/linux:sandbox_linux_unittests",
"//testing:empty_main",
]
if (use_dbus) {
deps += [
"//dbus:dbus_test_server",
"//dbus:dbus_unittests",
]
}
if (is_chrome_branded && is_official_build) {
# TODO(dpranke): add the linux_dump_symbols flag?
deps += [ "//chrome:linux_symbols" ]
}
}
if (is_ios || is_win || (is_linux && !is_chromeos)) {
deps += [
"//base:base_i18n_perftests",
"//google_apis:google_apis_unittests",
]
}
if ((is_win || is_mac || is_linux || is_chromeos || is_fuchsia) &&
(target_cpu == "x86" || target_cpu == "x64")) {
deps += [ "//third_party/swiftshader" ]
}
# TODO(GYP): Figure out which of these should (and can) build
# for chromeos/ios.
if (!is_chromeos && !is_ios && !is_fuchsia) {
deps += [
"//base:build_utf8_validator_tables",
"//base:check_example",
"//cc:cc_perftests",
"//components:components_perftests",
"//device:device_unittests",
"//gin:gin_shell",
"//gin:gin_unittests",
"//gpu:command_buffer_perftests",
"//gpu:gl_tests",
"//gpu:gpu_perftests",
"//ipc:ipc_perftests",
"//media:media_perftests",
"//net:dump_cache",
"//third_party/libphonenumber:libphonenumber_unittests",
"//ui/compositor:compositor_unittests",
]
if (!is_android) {
deps += [
"//chrome/test:load_library_perf_tests",
"//chrome/test:sync_performance_tests",
"//chrome/test/chromedriver:chromedriver",
"//courgette:courgette",
"//courgette:courgette_fuzz",
"//courgette:courgette_minimal_tool",
"//courgette:courgette_unittests",
"//media/cast:generate_barcode_video",
"//media/cast:generate_timecode_audio",
"//net:crash_cache",
"//net:dns_fuzz_stub",
"//net:net_watcher", # TODO(GYP): This should be conditional on
# use_v8_in_net
"//net:run_testserver",
"//net:stress_cache",
"//net:tld_cleanup",
"//ppapi:pepper_hash_for_uma",
"//ppapi:ppapi_perftests",
"//third_party/leveldatabase:env_chromium_unittests",
"//third_party/libaddressinput:libaddressinput_unittests",
]
}
if (is_android) {
deps += [ "//chrome/test/chromedriver:chromedriver($host_toolchain)" ]
}
if (enable_extensions) {
deps += [ "//extensions/shell:app_shell" ]
if (is_desktop_linux && is_official_build) {
deps += [ "//extensions/shell:app_shell_linux_symbols" ]
}
}
if (enable_nacl) {
deps += [ "//components/nacl/loader:nacl_loader_unittests" ]
if (is_linux) {
# TODO(dpranke): Figure out what platforms should actually have this.
deps += [ "//components/nacl/loader:nacl_helper" ]
if (enable_nacl_nonsfi) {
deps += [
"//components/nacl/loader:helper_nonsfi",
"//components/nacl/loader:nacl_helper_nonsfi_unittests",
]
}
}
}
if (media_use_ffmpeg && !is_android) {
deps += [ "//media:ffmpeg_regression_tests" ]
}
}
if (is_fuchsia) {
deps += [ "//chrome/test/chromedriver:chromedriver($host_toolchain)" ]
}
if (is_android || (is_linux && !is_chromeos)) {
deps += [
"//components/network_hints/browser",
"//content/public/app:browser",
"//content/public/app:child",
"//mojo:mojo_perftests",
"//services/service_manager/public/cpp",
"//testing/gmock:gmock_main",
"//third_party/breakpad:dump_syms($host_toolchain)",
"//third_party/breakpad:microdump_stackwalk($host_toolchain)",
"//third_party/breakpad:minidump_dump($host_toolchain)",
"//third_party/breakpad:minidump_stackwalk($host_toolchain)",
]
if (!is_android) {
deps += [
"//chrome/test:chrome_app_unittests",
"//gpu/khronos_glcts_support:khronos_glcts_test",
"//media/cast:cast_benchmarks",
"//media/cast:tap_proxy",
"//skia:filter_fuzz_stub",
"//skia:image_operations_bench",
"//ui/snapshot:snapshot_unittests",
]
if (!is_debug && !is_component_build) {
deps += [ "//chrome/tools/service_discovery_sniffer" ]
}
}
if (use_x11) {
if (target_cpu != "arm") {
deps += [ "//gpu/tools/compositor_model_bench" ]
}
}
}
if (is_mac) {
deps += [
"//third_party/breakpad:crash_inspector",
"//third_party/breakpad:dump_syms",
]
deps -= [
# Mojo in GN contains some things which are never compiled in GYP on Mac,
# so compilation fails on Mac. They need porting.
"//mojo",
]
}
if (is_win) {
deps += [
"//base:pe_image_test",
"//chrome/chrome_cleaner",
"//chrome/chrome_elf:chrome_elf_unittests",
"//chrome/chrome_elf:dll_hash_main",
"//chrome/elevation_service:elevation_service_unittests",
"//chrome/install_static:install_static_unittests",
"//chrome/installer/gcapi",
"//chrome/installer/setup:setup_unittests",
"//chrome/notification_helper:notification_helper_unittests",
"//chrome/test:delayloads_unittests",
"//cloud_print:cloud_print_unittests",
"//components/wifi:wifi_test",
"//components/zucchini",
"//net:quic_client",
"//net:quic_server",
"//sandbox/win:pocdll",
"//sandbox/win:sandbox_poc",
"//sandbox/win:sbox_integration_tests",
"//sandbox/win:sbox_unittests",
"//sandbox/win:sbox_validation_tests",
"//testing/gtest:gtest_main",
"//third_party/tcmalloc:addr2line-pdb",
# The following two are accessibility API debugging tools.
"//tools/accessibility/inspect:ax_dump_events",
"//tools/accessibility/inspect:ax_dump_tree",
"//tools/win/chromeexts:chromeexts",
]
# TODO(thakis): Enable this in cross builds, https://crbug.com/799827
if (!(is_component_build && is_debug && target_cpu == "x86") &&
host_os == "win") {
deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
}
} else if (!is_android && !is_ios && !is_fuchsia) {
deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
}
if (is_chromecast) {
deps += [ "//chromecast:cast_test_lists" ]
if (!is_fuchsia) {
deps += [ "//chromecast:cast_shell" ]
}
if (enable_extensions && use_aura) {
deps += [
"//chrome/browser/resources/chromeos/accessibility/chromevox:build",
]
}
}
if (is_mac || is_win || is_android || (is_linux && !is_chromeos)) {
deps += [
"//third_party/crashpad/crashpad:crashpad_tests",
"//third_party/crashpad/crashpad/handler:crashpad_handler",
"//third_party/crashpad/crashpad/tools:crashpad_database_util",
]
}
if (use_openh264) {
deps += [
"//third_party/openh264:common",
"//third_party/openh264:encoder",
"//third_party/openh264:processing",
]
}
if (enable_message_center) {
deps += [ "//ui/message_center:message_center_unittests" ]
}
if (!is_android && !is_ios && !is_fuchsia) {
deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ]
}
if (is_win || is_linux) {
deps += [
"//media/mojo/services:media_service_unittests",
"//mojo",
]
# crbug.com/676055: media_service_unittests fails to link under Windows
# component builds, due to duplicate symbol definitions.
if (is_win && is_component_build) {
deps -= [ "//media/mojo/services:media_service_unittests" ]
}
}
if (is_mac || is_linux || is_android || is_fuchsia) {
deps += [ "//third_party/perfetto:all" ]
}
if (is_win || is_mac || is_linux) {
deps += [ "//third_party/sqlite:sqlite_shell" ]
}
if (is_linux && !is_chromeos && !is_chromecast) {
# TODO(GYP): Figure out if any of these should be in gn_all
# and figure out how cross-platform they are
deps += [
"//chrome/installer/util:strings",
"//chrome/tools/convert_dict",
"//components/constrained_window:unit_tests",
"//components/metrics:serialization",
"//components/rappor:unit_tests",
"//components/services/filesystem:filesystem_service_unittests",
"//components/sessions:unit_tests",
"//media/blink:media_blink_unittests",
"//media/cast:udp_proxy",
"//storage/browser:dump_file_system",
"//third_party/angle:libANGLE",
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
"//third_party/leveldatabase:leveldb_test_targets",
"//third_party/libjpeg_turbo:simd",
"//third_party/opus:opus_compare",
"//third_party/opus:opus_demo",
"//third_party/opus:test_opus_api",
"//third_party/opus:test_opus_decode",
"//third_party/opus:test_opus_encode",
"//third_party/opus:test_opus_padding",
"//ui/display/types",
"//ui/shell_dialogs:shell_dialogs_unittests",
]
if (enable_nacl) {
deps += [ "//native_client/src/trusted/debug_stub:gdb_rsp_unittest" ]
}
if (target_cpu == "x86" || target_cpu == "x64") {
if (!is_android) {
deps += [ "//chrome/test:load_library_perf_tests" ]
}
if (enable_nacl) {
deps += [ "//native_client/src/trusted/platform_qualify:vcpuid" ]
}
deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
}
if (is_linux && current_toolchain == host_toolchain) {
deps += [ "//v8:v8_shell" ]
}
}
if ((is_linux && !is_chromecast) || (is_win && use_libfuzzer) ||
(use_libfuzzer && is_mac)) {
deps += [
"//chrome/services/ipp_parser/public/cpp:fuzzers",
"//testing/libfuzzer/fuzzers",
"//third_party/grpc:fuzzers",
"//third_party/icu/fuzzers",
"//third_party/qcms:fuzzers",
"//third_party/zlib/contrib/tests/fuzzers",
]
# TODO(crbug.com/906751): Get the libFuzzer tests working on Windows.
# Disable them for now becaue they cause the Windows clang ToT builder to
# fail.
if (!is_win) {
deps += [ "//testing/libfuzzer/tests:libfuzzer_tests" ]
}
}
if (enable_nacl) {
deps += [ "//native_client_sdk/src:nacl_core_sdk" ]
}
if (is_linux && use_ozone) {
deps += [
"//headless:headless_non_renderer",
"//headless:headless_tests",
]
}
if (enable_vr) {
deps += [
"//chrome/browser/vr:vr_common_perftests",
"//chrome/browser/vr:vr_common_unittests",
"//chrome/browser/vr:vr_pixeltests",
"//tools/perf/contrib/vr_benchmarks:vr_perf_tests",
]
if (is_desktop_linux && use_ozone) {
deps += [ "//chrome/browser/vr/testapp:vr_testapp" ]
}
if (is_android) {
deps += [ "//chrome/browser/android/vr:vr_android_unittests" ]
}
}
if (enable_vulkan) {
deps += [ "//gpu/vulkan/demo" ]
}
if (use_atk) {
deps += [
"//tools/accessibility/inspect:ax_dump_events",
"//tools/accessibility/inspect:ax_dump_tree",
]
}
if (build_dawn_tests) {
deps += [
"//third_party/dawn:dawn_end2end_tests_temp_group",
"//third_party/dawn:dawn_unittests_temp_group",
]
}
# PFFFT.
deps += [
"//third_party/pffft:fuzzers",
"//third_party/pffft:pffft_benchmark",
"//third_party/pffft:pffft_unittest",
]
}
if ((is_linux || is_win) && enable_remoting && !use_ozone) {
# This group is used for network annotation check test.
group("shipped_binaries") {
deps = [
"//chrome:chrome",
"//remoting/client",
"//remoting/host:host",
"//tools/traffic_annotation/summary:annotations_xml",
]
if (is_win) {
deps += [ "//chrome/chrome_cleaner:shipped_binaries" ]
}
}
}
if (is_fuchsia) {
# TODO(https://crbug.com/731217): This can't practically be in //v8 without
# duplicating all the Fuchsia running infrastructure there.
cr_fuchsia_package("d8_fuchsia_pkg") {
testonly = true
binary = "//v8:d8"
package_name_override = "d8"
}
fuchsia_package_runner("d8_fuchsia") {
testonly = true
package = ":d8_fuchsia_pkg"
package_name_override = "d8"
}
}
# TODO(GYP_GONE): Figure out if we really need this target or if there's
# some better way to specify things.
if (is_win) {
group("chrome_official_builder_no_unittests") {
deps = [
"//chrome/common/win:eventlog_provider",
"//chrome/credential_provider",
"//chrome/installer/gcapi",
"//chrome/installer/mini_installer",
"//chrome/updater/win/installer",
"//cloud_print",
"//cloud_print/virtual_driver/win/port_monitor:copy_gcp_portmon_binaries",
"//components/policy:pack_policy_templates",
"//components/zucchini",
"//courgette",
"//courgette:copy_courgette_binaries",
"//tools/metrics:metrics_metadata",
]
if (target_cpu == "x86") {
if (is_clang) {
deps += [ "//courgette(//build/toolchain/win:win_clang_x64)" ]
} else {
deps += [ "//courgette(//build/toolchain/win:x64)" ]
}
}
if (is_chrome_branded) {
deps += [ "//remoting/host:remoting_host_installation" ]
}
}
group("chrome_official_builder") {
testonly = true
deps = [
":chrome_official_builder_no_unittests",
"//base:base_unittests",
"//chrome/test:browser_tests",
"//ipc:ipc_tests",
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
"//printing:printing_unittests",
"//sql:sql_unittests",
"//ui/base:ui_base_unittests",
"//ui/gfx:gfx_unittests",
"//ui/touch_selection:ui_touch_selection_unittests",
"//ui/views:views_unittests",
"//url:url_unittests",
]
}
}
if (is_chromeos) {
group("chromiumos_preflight") {
testonly = true
deps = [
"//chrome",
"//chrome/browser/metrics/perf:profile_provider_unittest",
"//chrome/test/chromedriver",
"//components/chromeos_camera:jpeg_decode_accelerator_unittest",
"//media:media_unittests",
"//ppapi/examples/video_decode",
"//sandbox/linux:chrome_sandbox",
"//sandbox/linux:sandbox_linux_unittests",
"//third_party/breakpad:minidump_stackwalk($host_toolchain)",
# Blocked on https://github.com/catapult-project/catapult/issues/2297
#"//third_party/catapult/telemetry:bitmaptools",
"//tools/perf/clear_system_cache",
]
if (use_v4l2_codec || use_vaapi) {
deps += [
"//components/chromeos_camera:jpeg_encode_accelerator_unittest",
"//media/gpu:video_decode_accelerator_perf_tests",
"//media/gpu:video_decode_accelerator_tests",
"//media/gpu:video_encode_accelerator_unittest",
]
}
}
}
group("gn_visibility") {
deps = [
"//build/config/sanitizers:options_sources",
# "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility?
# "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility?
]
if (!is_ios) {
deps += [ "//v8:postmortem-metadata" ]
if (!v8_use_external_startup_data) {
deps += [ "//v8:v8_snapshot" ]
}
}
}
if (!is_ios) {
# This group includes all of the targets needed to build and test Blink,
# including running web tests (see below). This target is defined here because
# previously //third_party/WebKit, now //third_party/blink, couldn't depend on
# //content/shell. This might not longer be true, see
# https://crbug.com/1018659.
group("blink_tests") {
testonly = true
deps = [
":blink_web_tests",
"//third_party/blink/public:all_blink",
]
}
# Web tests runner
# third_party/blink/tools/run_web_tests.py
group("run_web_tests") {
testonly = true
deps = [ ":blink_web_tests" ]
}
if (!is_chromeos && !is_ios && !is_fuchsia && !is_android) {
# WPT Webdriver tests runner
# chrome/test/chromedriver/test/run_webdriver_tests.py
group("webdriver_wpt_tests") {
testonly = true
data = [
"//chrome/test/chromedriver/chrome_paths.py",
"//chrome/test/chromedriver/server/server.py",
"//chrome/test/chromedriver/test/run_webdriver_tests.py",
"//chrome/test/chromedriver/util.py",
"//testing/xvfb.py",
"//third_party/blink/tools/blinkpy/",
"//third_party/blink/web_tests/external/wpt/webdriver/",
"//third_party/blink/web_tests/VirtualTestSuites",
"//third_party/blink/web_tests/WebDriverExpectations",
"//third_party/pywebsocket3/src/mod_pywebsocket/",
]
data_deps = [
"//chrome:chrome",
"//chrome/test/chromedriver",
"//third_party/catapult/third_party/typ",
]
if (is_win) {
data_deps += [ "//build/win:copy_cdb_to_output" ]
}
}
group("wpt_tests_isolate") {
testonly = true
data_deps = [
"//chrome:chrome",
"//chrome/test/chromedriver",
]
deps = [
"//third_party/blink/tools:wpt_tests_isolate",
]
}
}
group("devtools_web_tests") {
testonly = true
deps = [ ":blink_web_tests" ]
data_deps = [ ":blink_web_tests" ]
data = [ "//third_party/devtools-frontend/src/test/webtests/" ]
}
group("blink_web_tests_support_data") {
testonly = true
data_deps = [
":layout_test_data_mojo_bindings",
":layout_test_data_mojo_bindings_lite",
"//content/shell:content_shell",
"//content/shell:mojo_bindings_js_data_deps",
"//content/test:mojo_web_test_bindings_js_data_deps",
"//device/bluetooth/public/mojom:fake_bluetooth_interfaces_js_data_deps",
"//device/vr/public/mojom:mojom_js_data_deps",
"//media/capture/mojom:image_capture_js_data_deps",
"//media/midi:mojo_js_data_deps",
"//mojo/public/interfaces/bindings/tests:test_data_deps",
"//mojo/public/js/ts/bindings/tests:test_interfaces_js_data_deps",
"//mojo/public/mojom/base:base_js_data_deps",
"//services/device/public/mojom:generic_sensor_js_data_deps",
"//services/device/public/mojom:mojom_js_data_deps",
"//services/device/public/mojom:usb_js_data_deps",
"//services/shape_detection/public/mojom:mojom_js_data_deps",
"//skia/public/mojom:mojom_js_data_deps",
"//testing/buildbot/filters:blink_web_tests_filter",
"//third_party/blink/public:blink_devtools_frontend_resources_files",
"//third_party/blink/public/mojom:mojom_platform_js_data_deps",
"//third_party/blink/renderer/core/html:js_files_for_form_controls_web_tests",
"//third_party/catapult/third_party/typ",
"//third_party/mesa_headers",
"//tools/imagediff",
]
if (is_android) {
data_deps += [
"//third_party/breakpad:breakpad_unittests",
"//third_party/breakpad:dump_syms",
"//third_party/breakpad:microdump_stackwalk",
"//third_party/breakpad:minidump_dump",
"//third_party/breakpad:minidump_stackwalk",
"//third_party/breakpad:symupload",
"//tools/android/forwarder2",
]
}
if (!is_win && !is_android) {
data_deps +=
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
}
if (is_mac) {
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
if (is_linux) {
data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
}
if (is_fuchsia) {
data_deps += [ "//content/shell:content_shell_fuchsia" ]
}
data = [
"//testing/scripts/common.py",
"//testing/scripts/run_isolated_script_test.py",
"//testing/xvfb.py",
"//third_party/blink/tools/",
"//third_party/blink/web_tests/VirtualTestSuites",
"//third_party/blink/web_tests/external/WPT_BASE_MANIFEST_7.json",
"//third_party/blink/web_tests/external/wpt/resources/",
"//third_party/blink/web_tests/resources/",
"//third_party/blink/web_tests/wpt_internal/",
"//third_party/pywebsocket3/src/mod_pywebsocket/",
]
if (is_win) {
data += [
"//third_party/apache-win32/",
"//third_party/perl/perl/",
]
data_deps += [ "//build/win:copy_cdb_to_output" ]
}
if (is_mac) {
data += [ "//third_party/apache-mac/" ]
}
if (is_android) {
data += [
"//third_party/catapult/",
"//build/android/",
]
}
}
# https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_tests.md
generate_wrapper("blink_web_tests") {
testonly = true
wrapper_script = "${root_build_dir}/bin/run_blink_web_tests"
executable = "//third_party/blink/tools/run_web_tests.py"
executable_args = []
if (is_debug) {
executable_args += [ "--debug" ]
} else {
executable_args += [ "--release" ]
}
if (is_android) {
executable_args += [
"--platform",
"android",
]
}
data_deps = [ ":blink_web_tests_support_data" ]
data = [
"//third_party/blink/perf_tests/",
"//third_party/blink/web_tests/",
]
}
generate_wrapper("webgpu_blink_web_tests") {
testonly = true
wrapper_script = "${root_build_dir}/bin/run_webgpu_blink_web_tests"
executable = "//third_party/blink/tools/run_web_tests.py"
executable_args = [
"--additional-driver-flag=--enable-unsafe-webgpu",
"--ignore-default-expectations",
"--additional-expectations",
"@WrappedPath(../../third_party/blink/web_tests/WebGPUExpectations)",
"--isolated-script-test-filter=wpt_internal/webgpu/*",
]
if (is_debug) {
executable_args += [ "--debug" ]
} else {
executable_args += [ "--release" ]
}
if (is_android) {
executable_args += [
"--platform",
"android",
]
}
data_deps = [ ":blink_web_tests_support_data" ]
data = [
"//third_party/blink/web_tests/WebGPUExpectations",
"//third_party/blink/web_tests/external/wpt/webgpu/",
]
}
copy("layout_test_data_mojo_bindings") {
testonly = true
sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings.js" ]
outputs =
[ "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings.js" ]
deps = [ "//mojo/public/js:bindings" ]
}
copy("layout_test_data_mojo_bindings_lite") {
testonly = true
sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings_lite.js" ]
outputs = [
"$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings_lite.js",
]
deps = [ "//mojo/public/js:bindings_lite" ]
}
group("blink_python_tests") {
data = [
"//build/android/",
"//components/crash/content/tools/generate_breakpad_symbols.py",
"//testing/scripts/common.py",
"//testing/scripts/run_isolated_script_test.py",
"//testing/test_env.py",
"//testing/xvfb.py",
"//third_party/blink/renderer/bindings/scripts/",
"//third_party/blink/renderer/build/scripts/",
"//third_party/blink/tools/",
"//third_party/blink/web_tests/ASANExpectations",
"//third_party/blink/web_tests/LeakExpectations",
"//third_party/blink/web_tests/MSANExpectations",
"//third_party/blink/web_tests/NeverFixTests",
"//third_party/blink/web_tests/SlowTests",
"//third_party/blink/web_tests/StaleTestExpectations",
"//third_party/blink/web_tests/TestExpectations",
"//third_party/blink/web_tests/VirtualTestSuites",
"//third_party/catapult/common/py_utils/",
"//third_party/catapult/devil/",
"//third_party/catapult/dependency_manager/",
"//third_party/catapult/third_party/zipfile/",
"//third_party/catapult/third_party/typ/",
"//third_party/depot_tools/pylint",
"//third_party/depot_tools/pylint-1.5",
"//third_party/depot_tools/pylint_main.py",
"//third_party/depot_tools/pylintrc",
"//third_party/ply/",
"//third_party/pymock/",
"//tools/idl_parser/",
]
}
}
group("chromium_builder_perf") {
testonly = true
if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
data_deps = [
"//cc:cc_perftests",
"//chrome/test:load_library_perf_tests",
"//chrome/test:performance_test_suite",
"//components/tracing:tracing_perftests",
"//gpu:command_buffer_perftests",
"//gpu:gpu_perftests",
"//media:media_perftests",
"//tools/perf/chrome_telemetry_build:telemetry_chrome_test",
]
if (is_android) {
data += [ "//third_party/android_sdk/public/platform-tools/adb" ]
}
if (!is_chromeos) {
data_deps += [ "//chrome/test:performance_browser_tests" ]
}
if (is_linux && !is_chromeos) {
if (is_official_build) {
# In GN builds, this is controlled by the 'linux_dump_symbols'
# flag, which defaults to 1 for official builds. For now,
# we skip the separate flag and just key off of is_official_build.
data_deps += [ "//chrome:linux_symbols" ]
}
data_deps += [ "//tools/perf/clear_system_cache" ]
}
if (is_win) {
data_deps += [ "//chrome/installer/mini_installer:mini_installer" ]
} else {
data_deps +=
[ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
}
if (is_win || is_android) {
data_deps += [
"//chrome/test:angle_perftests",
"//components:components_perftests",
]
}
}
}
if (!is_ios && !is_android && !is_chromecast && !is_fuchsia) {
group("chromium_builder_asan") {
testonly = true
deps = [
"//chrome:chrome",
"//content/shell:content_shell",
"//v8:d8",
]
if (!is_win) {
deps += [
"//net:dns_fuzz_stub",
"//skia:filter_fuzz_stub",
]
}
if (enable_ipc_fuzzer && !is_component_build) {
deps += [ "//tools/ipc_fuzzer:ipc_fuzzer_all" ]
}
if (!is_chromeos) {
deps += [
"//third_party/pdfium/samples:pdfium_test",
"//v8:v8_shell($v8_snapshot_toolchain)",
]
}
if (!is_component_build) {
# See https://bugs.chromium.org/p/chromium/issues/detail?id=942546#c11.
deps += [
"//third_party/webrtc/rtc_tools:rtp_generator",
"//third_party/webrtc/rtc_tools:video_replay",
]
}
}
}
if (is_android) {
group("optimize_gn_gen") {
deps = [
# These run expensive scripts in non-default toolchains. Generally, host
# toolchain targets are loaded in the later part of the run, and the
# result is they push out the end of generation. By preloading these, the
# scripts can be parallelized with the rest of the load.
"//build/config/linux(//build/toolchain/linux:clang_x64)",
"//build/config/posix(//build/toolchain/linux:clang_x64)",
# Include x86 toolchains as well since V8 uses them for 32-bit snapshot
# generation.
"//build/config/linux(//build/toolchain/linux:clang_x86)",
"//build/config/posix(//build/toolchain/linux:clang_x86)",
]
}
}
if (closure_compile) {
group("webui_closure_compile") {
testonly = true
data_deps = [
"chrome/browser/resources:closure_compile",
"chrome/test:closure_compile",
"components/flags_ui/resources:closure_compile",
"components/neterror/resources:closure_compile",
"components/security_interstitials/core/common/resources:closure_compile",
"components/sync/driver/resources:closure_compile",
"components/ukm/debug:closure_compile",
"content/browser/resources:closure_compile",
"mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile",
"ui/webui/resources:closure_compile",
]
if (is_chromeos) {
data_deps += [
"chromeos/components:closure_compile",
"ui/file_manager:closure_compile",
]
}
if (is_android) {
data_deps += [ "components/offline_pages/resources:closure_compile" ]
}
if (enable_kaleidoscope) {
data_deps +=
[ "chrome/browser/media/kaleidoscope/internal:closure_compile" ]
}
}
}
# Because of the source assignment filter, many targets end up over-filtering
# their sources if the output directory contains a platform name. Assert that
# this doesn't happen. http://crbug.com/548283
assert(
filter_exclude([ "$root_build_dir/foo" ],
# List copied from //build/config/BUILDCONFIG.gn.
[
"*\bandroid/*",
"*\bchromeos/*",
"*\bcocoa/*",
"*\bios/*",
"*\blinux/*",
"*\bmac/*",
"*\bposix/*",
"*\bwin/*",
]) != [],
"Do not use a platform name in your output directory (found \"$root_build_dir\"). http://crbug.com/548283")