BUILD.gn 58 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779
  1. # Copyright (c) 2013 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. # This is the root build file for GN. GN will start processing by loading this
  5. # file, and recursively load all dependencies until all dependencies are either
  6. # resolved or known not to exist (which will cause the build to fail). So if
  7. # you add a new build file, there must be some path of dependencies from this
  8. # file to your new one or GN won't know about it.
  9. import("//build/config/chromeos/ui_mode.gni")
  10. import("//build/config/compiler/compiler.gni")
  11. import("//build/config/dcheck_always_on.gni")
  12. import("//build/config/features.gni")
  13. import("//build/config/rust.gni")
  14. import("//build/config/sanitizers/sanitizers.gni")
  15. import("//build/config/ui.gni")
  16. import("//build/gn_logs.gni")
  17. import("//build/util/generate_wrapper.gni")
  18. import("//chrome/browser/buildflags.gni")
  19. import("//components/nacl/features.gni")
  20. import("//device/vr/buildflags/buildflags.gni")
  21. import("//extensions/buildflags/buildflags.gni")
  22. import("//gpu/vulkan/features.gni")
  23. import("//media/gpu/args.gni")
  24. import("//media/media_options.gni")
  25. import("//pdf/features.gni")
  26. import("//ppapi/buildflags/buildflags.gni")
  27. import("//printing/buildflags/buildflags.gni")
  28. import("//remoting/remoting_enable.gni")
  29. import("//third_party/closure_compiler/compile_js.gni")
  30. import("//tools/ipc_fuzzer/ipc_fuzzer.gni")
  31. import("//ui/base/ui_features.gni")
  32. import("//ui/gl/features.gni")
  33. import("//v8/gni/v8.gni")
  34. if (is_android) {
  35. import("//build/config/android/config.gni")
  36. }
  37. if (is_linux) {
  38. import("build/config/linux/gtk/gtk.gni")
  39. }
  40. if (!is_ios) {
  41. import("//v8/gni/snapshot_toolchain.gni")
  42. }
  43. declare_args() {
  44. # A list of extra dependencies to add to the root target. This allows a
  45. # checkout to add additional targets without explicitly changing any checked-
  46. # in files.
  47. root_extra_deps = []
  48. }
  49. if (is_official_build) {
  50. # An official (maximally optimized!) component (optimized for build times)
  51. # build doesn't make sense and usually doesn't work.
  52. assert(!is_component_build)
  53. }
  54. # This file defines the following two main targets:
  55. #
  56. # "gn_all" is used to create explicit dependencies from the root BUILD.gn to
  57. # each top-level component that we wish to include when building everything via
  58. # "all". This is required since the set of targets built by "all" is determined
  59. # automatically based on reachability from the root BUILD.gn (for details, see
  60. # crbug.com/503241). Builders should typically use "all", or list targets
  61. # explicitly, rather than relying on "gn_all".
  62. #
  63. # "gn_visibility": targets that are normally not visible to top-level targets,
  64. # but are built anyway by "all". Since we don't want any such targets, we have
  65. # this placeholder to make sure hidden targets that aren't otherwise depended
  66. # on yet are accounted for.
  67. group("gn_all") {
  68. testonly = true
  69. deps = [
  70. ":gn_visibility",
  71. "//base:base_perftests",
  72. "//base:base_unittests",
  73. "//codelabs",
  74. "//components:components_unittests",
  75. "//components/gwp_asan:gwp_asan_unittests",
  76. "//infra/orchestrator:orchestrator_all",
  77. "//net:net_unittests",
  78. "//sandbox:sandbox_unittests",
  79. "//services:services_unittests",
  80. "//services/service_manager/public/cpp",
  81. "//skia:skia_unittests",
  82. "//sql:sql_unittests",
  83. "//third_party/angle/src/tests:angle_end2end_tests",
  84. "//third_party/angle/src/tests:angle_unittests",
  85. "//third_party/angle/src/tests:angle_white_box_tests",
  86. "//third_party/flatbuffers:flatbuffers_unittests",
  87. "//third_party/liburlpattern:liburlpattern_unittests",
  88. "//tools/binary_size:binary_size_trybot_py",
  89. "//tools/ipc_fuzzer:ipc_fuzzer_all",
  90. "//tools/metrics:metrics_metadata",
  91. "//ui/base:ui_base_unittests",
  92. "//ui/color:color_unittests",
  93. "//ui/gfx:gfx_unittests",
  94. "//url:url_unittests",
  95. ]
  96. if (!is_component_build) {
  97. deps += [ "//third_party/abseil-cpp:absl_tests" ]
  98. }
  99. if (enable_js_type_check) {
  100. deps += [ ":webui_closure_compile" ]
  101. }
  102. if (!is_android && !is_castos) {
  103. deps += [
  104. "//crypto:crypto_unittests",
  105. "//google_apis/gcm:gcm_unit_tests",
  106. ]
  107. }
  108. if (!is_ios && !is_android && !is_castos) {
  109. deps += [
  110. "//chrome",
  111. "//chrome/browser/ui/color:dump_colors",
  112. "//chrome/test:browser_tests",
  113. "//chrome/test:interactive_ui_tests",
  114. "//chrome/test:sync_integration_tests",
  115. "//components/subresource_filter/tools:subresource_filter_tools",
  116. "//components/zucchini:zucchini",
  117. "//components/zucchini:zucchini_unittests",
  118. "//gpu/gles2_conform_support:gles2_conform_test",
  119. "//gpu/khronos_glcts_support:khronos_glcts_test",
  120. "//net:hpack_example_generator",
  121. "//third_party/vulkan-deps/spirv-tools/src:SPIRV-Tools",
  122. "//tools/aggregation_service:aggregation_service_tool",
  123. "//tools/attribution_reporting:attribution_reporting_simulator",
  124. "//tools/perf/clear_system_cache",
  125. "//tools/polymer:polymer_tools_python_unittests",
  126. "//tools/privacy_budget:privacy_budget_tools",
  127. "//ui/accessibility:accessibility_perftests",
  128. "//ui/accessibility:accessibility_unittests",
  129. "//ui/accessibility/extensions:extension_tests",
  130. "//ui/accessibility/extensions:extensions",
  131. ]
  132. }
  133. if (!is_castos) {
  134. deps += [
  135. "//chrome/installer",
  136. "//chrome/updater",
  137. ]
  138. }
  139. if (enable_ppapi) {
  140. deps += [
  141. "//ppapi:ppapi_unittests",
  142. "//ppapi/examples",
  143. ]
  144. }
  145. if (is_chromeos_lacros) {
  146. deps += [
  147. "//chrome/test:lacros_chrome_browsertests",
  148. "//chrome/test:lacros_chrome_unittests",
  149. ]
  150. }
  151. if (!is_ios && !is_castos) {
  152. deps += [ "//chrome/test:unit_tests" ]
  153. }
  154. if (!is_ios) {
  155. deps += [
  156. ":chromedriver",
  157. "//cc:cc_unittests",
  158. "//components:components_browsertests",
  159. "//components/policy:policy_templates",
  160. "//components/url_formatter/tools:format_url",
  161. "//components/viz:viz_perftests",
  162. "//components/viz:viz_unittests",
  163. "//content/shell:content_shell",
  164. "//content/test:content_browsertests",
  165. "//content/test:content_unittests",
  166. "//device:device_unittests",
  167. "//gpu:gpu_benchmark",
  168. "//gpu:gpu_unittests",
  169. "//ipc:ipc_tests",
  170. "//media:media_unittests",
  171. "//media/capture:capture_unittests",
  172. "//media/midi:midi_unittests",
  173. "//media/mojo:media_mojo_unittests",
  174. "//mojo",
  175. "//mojo:mojo_unittests",
  176. "//net:net_perftests",
  177. "//storage:storage_unittests",
  178. "//third_party/blink/common:blink_common_unittests",
  179. "//third_party/blink/renderer/controller:blink_unittests",
  180. "//third_party/blink/renderer/platform:blink_platform_unittests",
  181. "//third_party/blink/renderer/platform/heap:blink_heap_unittests",
  182. "//third_party/blink/renderer/platform/wtf:wtf_unittests",
  183. "//third_party/libjingle_xmpp:libjingle_xmpp_unittests",
  184. "//tools/imagediff",
  185. "//ui/display:display_unittests",
  186. "//ui/events:events_unittests",
  187. "//ui/gl:gl_unittests",
  188. "//ui/latency:latency_unittests",
  189. "//ui/native_theme:native_theme_unittests",
  190. "//ui/touch_selection:ui_touch_selection_unittests",
  191. "//url/ipc:url_ipc_unittests",
  192. "//v8:gn_all",
  193. ]
  194. }
  195. if (is_win || is_linux || is_android) {
  196. deps += [
  197. "//weblayer/shell:weblayer_shell",
  198. "//weblayer/test:weblayer_browsertests",
  199. "//weblayer/test:weblayer_unittests",
  200. ]
  201. if (is_android) {
  202. deps += [
  203. "//weblayer/browser/android/javatests:weblayer_instrumentation_test_apk",
  204. "//weblayer/browser/java:weblayer_junit_tests",
  205. ]
  206. }
  207. }
  208. if (!is_ios && !is_android && !is_fuchsia) {
  209. deps += [ "//components/viz/demo:viz_demo" ]
  210. if (!use_libfuzzer) {
  211. # TODO(crbug.com/1241949): libcronet.$version.so fails to link in libfuzzer builds.
  212. deps += [
  213. "//components/cronet:cronet_tests",
  214. "//components/cronet:cronet_unittests",
  215. ]
  216. }
  217. }
  218. if (!is_ios) {
  219. deps += [
  220. "//google_apis/gcm:mcs_probe",
  221. "//media/cast:cast_unittests",
  222. "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
  223. ]
  224. if (!is_android) {
  225. if (!is_castos) {
  226. deps += [ "//chrome/test:telemetry_perf_unittests" ]
  227. }
  228. } else {
  229. import("//tools/perf/chrome_telemetry_build/android_browser_types.gni")
  230. foreach(_target_suffix, telemetry_android_browser_target_suffixes) {
  231. deps += [ "//chrome/test:telemetry_perf_unittests${_target_suffix}" ]
  232. }
  233. }
  234. } else {
  235. deps += [
  236. "//ios:all",
  237. "//third_party/crashpad/crashpad:crashpad_tests",
  238. ]
  239. }
  240. if (is_fuchsia) {
  241. # Add targets that only exist on Fuchsia.
  242. deps += [
  243. ":d8_fuchsia",
  244. "//build/fuchsia/cipd",
  245. "//chrome/app:chrome_fuchsia",
  246. "//fuchsia_web:gn_all",
  247. "//tools/fuchsia/size_tests:fuchsia_sizes",
  248. # Ensure this target continues to build.
  249. "//chromecast/bindings:bindings_manager_fuchsia",
  250. ]
  251. }
  252. deps += root_extra_deps
  253. if (enable_basic_printing) {
  254. deps += [ "//printing:printing_unittests" ]
  255. }
  256. if (enable_extensions) {
  257. deps += [
  258. "//extensions:extensions_browsertests",
  259. "//extensions:extensions_unittests",
  260. "//extensions/browser/api/declarative_net_request/filter_list_converter",
  261. "//extensions/shell:app_shell_unittests",
  262. ]
  263. }
  264. if (enable_pdf) {
  265. deps += [
  266. "//pdf/pdfium/fuzzers",
  267. "//third_party/pdfium/samples:pdfium_test",
  268. ]
  269. }
  270. if (enable_remoting) {
  271. deps += [ "//remoting:remoting_all" ]
  272. }
  273. if (toolkit_views) {
  274. deps += [
  275. "//ui/views:views_unittests",
  276. "//ui/views/examples:views_examples",
  277. "//ui/views/examples:views_examples_unittests",
  278. "//ui/views/examples:views_examples_with_content",
  279. ]
  280. }
  281. if (use_aura) {
  282. deps += [
  283. "//ui/aura:aura_demo",
  284. "//ui/aura:aura_unittests",
  285. "//ui/wm:wm_unittests",
  286. ]
  287. }
  288. if (use_ozone) {
  289. deps += [
  290. "//ui/ozone",
  291. "//ui/ozone:unittests",
  292. "//ui/ozone/demo",
  293. ]
  294. }
  295. if (is_win) {
  296. deps += [
  297. "//chrome/credential_provider",
  298. "//chrome/credential_provider/test:gcp_unittests",
  299. ]
  300. }
  301. if (is_win || is_linux) {
  302. deps += [ "//tools/traffic_annotation/auditor:traffic_annotation_auditor" ]
  303. }
  304. if (is_mac) {
  305. deps += [
  306. "//chrome/installer/gcapi_mac:gcapi_example",
  307. "//tools/mac/power:all",
  308. ]
  309. }
  310. # Allow building md5sum tool for other OSes (android is added below).
  311. # For Windows, see: crbug.com/1090428.
  312. # TODO(cavalcantii): move it out of 'android' folder.
  313. if (!is_win) {
  314. deps += [ "//tools/android/md5sum" ]
  315. }
  316. if (is_android) {
  317. deps += [
  318. "//android_webview/js_sandbox/javatests:webview_js_sandbox_test_app",
  319. "//base:base_junit_tests",
  320. "//base/android/jni_generator:jni_generator_tests",
  321. "//base/android/linker:chromium_android_linker",
  322. "//build/android/gyp/test:hello_world",
  323. "//build/android/stacktrace:java_deobfuscate",
  324. "//build/config/android/test/proto:test_build_protos",
  325. "//chrome/android/monochrome:monochrome_public_apk_checker",
  326. "//chrome/android/webapk/shell_apk:maps_go_webapk",
  327. "//chrome/android/webapk/shell_apk:webapk",
  328. "//chrome/android/webapk/shell_apk/prepare_upload_dir:prepare_webapk_shell_upload_dir",
  329. "//chrome/test:android_browsertests",
  330. "//components:components_junit_tests",
  331. "//content/public/android:content_junit_tests",
  332. "//content/shell/android:content_shell_apk",
  333. "//device:device_junit_tests",
  334. "//media/gpu:video_decode_accelerator_unittest",
  335. "//net/android:net_junit_tests",
  336. "//services:services_junit_tests",
  337. "//testing/android/junit:junit_unit_tests",
  338. "//third_party/android_build_tools/lint:custom_lint_java",
  339. "//third_party/catapult/devil",
  340. "//third_party/r8:custom_d8_java",
  341. "//tools/android:android_tools",
  342. "//tools/android:memconsumer",
  343. "//tools/android:push_apps_to_background",
  344. "//tools/android/audio_focus_grabber:audio_focus_grabber_apk",
  345. "//tools/android/customtabs_benchmark:customtabs_benchmark_apk",
  346. "//tools/android/kerberos/SpnegoAuthenticator:spnego_authenticator_apk",
  347. "//ui/android:ui_junit_tests",
  348. "//weblayer/public/java:client_aar",
  349. "//weblayer/shell/android:weblayer_shell_apk",
  350. "//weblayer/shell/android:weblayer_support_apk",
  351. ]
  352. deps -= [
  353. "//net:net_perftests",
  354. "//url:url_unittests",
  355. ]
  356. if (!is_component_build) {
  357. deps += [
  358. "//components/cronet/android:cronet_package_android",
  359. "//components/cronet/android:cronet_perf_test_apk",
  360. "//components/cronet/android:cronet_sample_apk",
  361. "//components/cronet/android:cronet_sample_test_apk",
  362. "//components/cronet/android:cronet_test_instrumentation_apk",
  363. "//components/cronet/android:cronet_unittests_android",
  364. ]
  365. }
  366. if (!is_cast_android) {
  367. deps += [
  368. "//android_webview:empty_group",
  369. "//android_webview/test",
  370. "//android_webview/tools/automated_ui_tests:webview_ui_test_app",
  371. "//android_webview/tools/system_webview_shell",
  372. "//chrome/android:chrome_junit_tests",
  373. "//chrome/android:chrome_public_apk",
  374. "//chrome/android:chrome_public_test_apk",
  375. "//chrome/android:chrome_public_unit_test_apk",
  376. "//chrome/browser/android/examples/custom_tabs_client:custom_tabs_client_example_apk",
  377. "//chrome/browser/android/examples/partner_browser_customizations_provider:partner_browser_customizations_example_apk",
  378. "//content/shell/android:content_shell_test_apk",
  379. ]
  380. }
  381. if (enable_chrome_android_internal) {
  382. deps += [ "//clank" ]
  383. }
  384. }
  385. # NOTE: The following should really be 'is_android', but the fuzzing build
  386. # seems currently broken for this platform at the moment, and the
  387. # corresponding code build and works on Linux unmodified.
  388. # See instructions in the corresponding BUILD.gn.
  389. if (is_linux || is_chromeos) {
  390. deps +=
  391. [ "//third_party/android_crazy_linker:android_crazy_linker_zip_fuzzer" ]
  392. }
  393. if (is_linux || is_chromeos) {
  394. # This is only used by ChromeOS, but we want maximal fuzzer coverage, so
  395. # run it under linux too.
  396. deps += [
  397. "//third_party/minizip:minizip_compress_fuzzer",
  398. "//third_party/minizip:minizip_uncompress_fuzzer",
  399. ]
  400. }
  401. if (is_linux || is_chromeos || is_android) {
  402. deps += [
  403. "//third_party/breakpad:breakpad_unittests",
  404. "//third_party/breakpad:core-2-minidump",
  405. "//third_party/breakpad:generate_test_dump",
  406. "//third_party/breakpad:minidump-2-core",
  407. "//tools/dump_process_memory:dump_process",
  408. ]
  409. }
  410. if (is_linux || is_chromeos || is_android || is_mac) {
  411. deps += [ "//tools/memory/partition_allocator:all" ]
  412. }
  413. if (is_chromeos_ash) {
  414. deps += [
  415. "//ash:ash_unittests",
  416. "//ash/components:ash_components_unittests",
  417. "//ash/components/proximity_auth:proximity_auth_unittests",
  418. "//ash/keyboard/ui:keyboard_unittests",
  419. "//ash/webui:ash_webui_unittests",
  420. "//chrome/browser/metrics/perf:profile_provider_unittest",
  421. "//chrome/test:ash_crosapi_browsertests",
  422. "//chrome/test:usage_time_limit_unittests",
  423. "//chromeos/components:chromeos_components_unittests",
  424. "//components/exo/wayland:wayland_client_compatibility_tests",
  425. "//components/session_manager/core",
  426. "//third_party/shell-encryption:shell_encryption_unittests",
  427. "//tools/traffic_annotation/auditor:traffic_annotation_auditor",
  428. "//ui/chromeos:ui_chromeos_unittests",
  429. ]
  430. }
  431. if (is_chromeos) {
  432. deps += [ "//chromeos:chromeos_unittests" ]
  433. }
  434. if (is_chromeos_ash || is_mac || is_win) {
  435. deps += [
  436. "//rlz:rlz_id",
  437. "//rlz:rlz_lib",
  438. "//rlz:rlz_unittests",
  439. ]
  440. }
  441. if (is_linux || is_chromeos) {
  442. # The following are definitely linux-only.
  443. deps += [
  444. "//net:disk_cache_memory_test",
  445. "//net:quic_client",
  446. "//net:quic_server",
  447. "//sandbox/linux:chrome_sandbox",
  448. "//sandbox/linux:sandbox_linux_unittests",
  449. ]
  450. if (!is_clang) {
  451. deps += [ "//testing:empty_main" ]
  452. }
  453. if (!is_castos) {
  454. deps += [ "//chrome:xdg_mime" ]
  455. }
  456. if (use_dbus) {
  457. deps += [
  458. "//dbus:dbus_test_server",
  459. "//dbus:dbus_unittests",
  460. ]
  461. }
  462. if (is_chrome_branded && is_official_build) {
  463. # TODO(dpranke): add the linux_dump_symbols flag?
  464. deps += [ "//chrome:linux_symbols" ]
  465. }
  466. }
  467. if (is_ios || is_win || is_linux || is_chromeos_lacros || is_fuchsia) {
  468. deps += [
  469. "//base:base_i18n_perftests",
  470. "//google_apis:google_apis_unittests",
  471. ]
  472. }
  473. if ((is_win || is_mac || is_linux || is_chromeos || is_fuchsia) &&
  474. (target_cpu == "x86" || target_cpu == "x64")) {
  475. deps += [
  476. "//third_party/swiftshader/src/Vulkan:icd_file",
  477. "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan",
  478. ]
  479. }
  480. # TODO(GYP): Figure out which of these should (and can) build
  481. # for Chrome OS and iOS.
  482. if (!is_chromeos_ash && !is_ios) {
  483. deps += [
  484. "//base:build_utf8_validator_tables",
  485. "//base:check_example",
  486. "//cc:cc_perftests",
  487. "//components:components_perftests",
  488. "//device:device_unittests",
  489. "//gin:gin_shell",
  490. "//gin:gin_unittests",
  491. "//gpu:command_buffer_perftests",
  492. "//gpu:gl_tests",
  493. "//gpu:gpu_perftests",
  494. "//ipc:ipc_perftests",
  495. "//media:media_perftests",
  496. "//net:dump_cache",
  497. "//third_party/libphonenumber:libphonenumber_unittests",
  498. "//ui/compositor:compositor_unittests",
  499. ]
  500. if (!is_android && !is_castos) {
  501. deps += [
  502. "//chrome/test:load_library_perf_tests",
  503. "//chrome/test:sync_performance_tests",
  504. ]
  505. }
  506. if (!is_android) {
  507. deps += [
  508. "//courgette:courgette",
  509. "//courgette:courgette_fuzz",
  510. "//courgette:courgette_minimal_tool",
  511. "//courgette:courgette_unittests",
  512. "//media/cast:generate_barcode_video",
  513. "//media/cast:generate_timecode_audio",
  514. "//net:crash_cache",
  515. "//net:net_watcher", # TODO(GYP): This should be conditional on
  516. # use_v8_in_net
  517. "//net:run_testserver",
  518. "//net:stress_cache",
  519. "//net:tld_cleanup",
  520. "//third_party/leveldatabase:env_chromium_unittests",
  521. "//third_party/libaddressinput:libaddressinput_unittests",
  522. ]
  523. }
  524. if (enable_extensions) {
  525. deps += [ "//extensions/shell:app_shell" ]
  526. }
  527. # TODO(https://crbug.com/1299021): Implement building these NaCl targets
  528. # as ARM32 when Chrome is built for ARM64 (for Linux/Chrome OS).
  529. if (enable_nacl && target_cpu != "arm64") {
  530. deps += [ "//components/nacl/loader:nacl_loader_unittests" ]
  531. if (is_linux || is_chromeos) {
  532. # TODO(dpranke): Figure out what platforms should actually have this.
  533. deps += [ "//components/nacl/loader:nacl_helper" ]
  534. }
  535. }
  536. if (media_use_ffmpeg && !is_android) {
  537. deps += [ "//media:ffmpeg_regression_tests" ]
  538. }
  539. }
  540. if (enable_ppapi) {
  541. deps += [
  542. "//ppapi:pepper_hash_for_uma",
  543. "//ppapi:ppapi_perftests",
  544. ]
  545. }
  546. if (is_android || is_linux || is_chromeos_lacros) {
  547. deps += [
  548. "//components/network_hints/browser",
  549. "//content/public/app",
  550. "//mojo:mojo_perftests",
  551. "//services/service_manager/public/cpp",
  552. "//testing/gmock:gmock_main",
  553. "//third_party/breakpad:dump_syms($host_toolchain)",
  554. "//third_party/breakpad:microdump_stackwalk($host_toolchain)",
  555. "//third_party/breakpad:minidump_dump($host_toolchain)",
  556. "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
  557. ]
  558. }
  559. if (is_linux || is_chromeos_lacros) {
  560. deps += [
  561. "//gpu/khronos_glcts_support:khronos_glcts_test",
  562. "//media/cast:cast_benchmarks",
  563. "//media/cast:tap_proxy",
  564. "//skia:filter_fuzz_stub",
  565. "//skia:image_operations_bench",
  566. "//ui/snapshot:snapshot_unittests",
  567. ]
  568. if (!is_castos) {
  569. deps += [ "//chrome/test:chrome_app_unittests" ]
  570. }
  571. if (!is_debug && !is_component_build && !is_castos) {
  572. deps += [ "//chrome/tools/service_discovery_sniffer" ]
  573. }
  574. }
  575. if (ozone_platform_x11 && !is_castos && target_cpu != "arm") {
  576. deps += [ "//gpu/tools/compositor_model_bench" ]
  577. }
  578. if (is_mac) {
  579. deps += [
  580. "//third_party/breakpad:crash_inspector",
  581. "//third_party/breakpad:dump_syms",
  582. # The following are accessibility API tools.
  583. "//tools/accessibility/inspect:ax_dump_events",
  584. "//tools/accessibility/inspect:ax_dump_tree",
  585. ]
  586. deps -= [
  587. # Mojo in GN contains some things which are never compiled in GYP on Mac,
  588. # so compilation fails on Mac. They need porting.
  589. "//mojo",
  590. ]
  591. }
  592. if (is_win) {
  593. deps += [
  594. "//base:pe_image_test",
  595. "//chrome/chrome_cleaner",
  596. "//chrome/chrome_elf:chrome_elf_unittests",
  597. "//chrome/chrome_elf:dll_hash_main",
  598. "//chrome/elevation_service:elevation_service_unittests",
  599. "//chrome/install_static:install_static_unittests",
  600. "//chrome/installer/gcapi",
  601. "//chrome/installer/setup:setup_unittests",
  602. "//chrome/notification_helper:notification_helper_unittests",
  603. "//chrome/test:delayloads_unittests",
  604. "//components/wifi:wifi_test",
  605. "//components/zucchini",
  606. "//net:quic_client",
  607. "//net:quic_server",
  608. "//sandbox/win:sbox_integration_tests",
  609. "//sandbox/win:sbox_unittests",
  610. "//sandbox/win:sbox_validation_tests",
  611. "//testing/gtest:gtest_main",
  612. # The following two are accessibility API debugging tools.
  613. "//tools/accessibility/inspect:ax_dump_events",
  614. "//tools/accessibility/inspect:ax_dump_tree",
  615. "//tools/win/chromeexts:chromeexts",
  616. ]
  617. # TODO(thakis): Enable this in cross builds, https://crbug.com/799827
  618. if (!(is_component_build && is_debug && target_cpu == "x86") &&
  619. host_os == "win") {
  620. deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
  621. }
  622. } else if (!is_android && !is_ios && !is_fuchsia) {
  623. deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
  624. }
  625. if (is_cast_android || is_castos || (is_fuchsia && enable_cast_receiver)) {
  626. deps += [ "//chromecast:cast_test_lists" ]
  627. }
  628. if (is_cast_android || is_castos) {
  629. deps += [
  630. "//chromecast:cast_shell",
  631. "//chromecast/cast_core:core_runtime_simple",
  632. ]
  633. }
  634. if (is_mac || is_win || is_android || is_linux || is_chromeos) {
  635. deps += [
  636. "//third_party/crashpad/crashpad:crashpad_tests",
  637. "//third_party/crashpad/crashpad/handler:crashpad_handler",
  638. "//third_party/crashpad/crashpad/tools:crashpad_database_util",
  639. ]
  640. }
  641. if (enable_message_center) {
  642. deps += [ "//ui/message_center:message_center_unittests" ]
  643. }
  644. if (!is_android && !is_ios) {
  645. deps += [ "//content/browser/bluetooth/tools:bluetooth_metrics_hash" ]
  646. }
  647. if (is_win || is_linux || is_chromeos) {
  648. deps += [ "//mojo" ]
  649. }
  650. if (is_mac || is_linux || is_chromeos || is_android || is_fuchsia) {
  651. deps += [ "//third_party/perfetto:all" ]
  652. }
  653. if (is_win || is_mac || is_linux || is_chromeos) {
  654. deps += [ "//third_party/sqlite:sqlite_shell" ]
  655. }
  656. if ((is_linux && !is_castos) || is_chromeos_lacros || is_fuchsia) {
  657. # TODO(https://crbug.com/1329673): Figure out if this should be in gn_all
  658. # and how cross-platform this is.
  659. deps += [ "//components/services/filesystem:filesystem_service_unittests" ]
  660. }
  661. if ((is_linux && !is_castos) || is_chromeos_lacros) {
  662. # TODO(https://crbug.com/1329673): Figure out if any of these should be in
  663. # gn_all and figure out how cross-platform they are.
  664. deps += [
  665. "//chrome/installer/util:strings",
  666. "//chrome/tools/convert_dict",
  667. "//components/constrained_window:unit_tests",
  668. "//components/metrics:serialization",
  669. "//components/sessions:unit_tests",
  670. "//media/cast:udp_proxy",
  671. "//storage/browser:dump_file_system",
  672. "//third_party/angle:libANGLE",
  673. "//third_party/angle:libEGL",
  674. "//third_party/angle:libGLESv2",
  675. "//third_party/leveldatabase:leveldb_test_targets",
  676. "//third_party/libjpeg_turbo:simd",
  677. "//third_party/opus:opus_compare",
  678. "//third_party/opus:opus_demo",
  679. "//third_party/opus:test_opus_api",
  680. "//third_party/opus:test_opus_decode",
  681. "//third_party/opus:test_opus_encode",
  682. "//third_party/opus:test_opus_padding",
  683. "//ui/display/types",
  684. "//ui/shell_dialogs:shell_dialogs_unittests",
  685. ]
  686. if (target_cpu == "x86" || target_cpu == "x64") {
  687. if (!is_android) {
  688. deps += [ "//chrome/test:load_library_perf_tests" ]
  689. }
  690. deps += [ "//third_party/libjpeg_turbo:simd_asm" ]
  691. }
  692. if ((is_linux || is_chromeos) && current_toolchain == host_toolchain) {
  693. deps += [ "//v8:v8_shell" ]
  694. }
  695. }
  696. if ((is_linux && !is_castos) || is_chromeos ||
  697. ((is_win || is_mac) && use_libfuzzer)) {
  698. deps += [
  699. "//testing/libfuzzer/fuzzers",
  700. "//third_party/freetype-testing:fuzzers",
  701. "//third_party/grpc:fuzzers",
  702. "//third_party/icu/fuzzers",
  703. "//third_party/qcms:fuzzers",
  704. "//third_party/ukey2/fuzzers",
  705. "//third_party/zlib/contrib/tests/fuzzers",
  706. ]
  707. if (is_chromeos_ash) {
  708. deps += [ "//chrome/services/ipp_parser/public/cpp:fuzzers" ]
  709. }
  710. # TODO(crbug.com/906751): Get the libFuzzer tests working on Windows.
  711. # Disable them for now because they cause the Windows clang ToT builder to
  712. # fail.
  713. if (!is_win) {
  714. deps += [ "//testing/libfuzzer/tests:libfuzzer_tests" ]
  715. }
  716. }
  717. # TODO(https://crbug.com/1299021): Remove the special case for arm64.
  718. if (enable_nacl && target_cpu != "arm64") {
  719. deps += [ "//native_client_sdk/src:nacl_core_sdk" ]
  720. }
  721. if (((is_linux || is_chromeos) && use_ozone) || is_fuchsia) {
  722. deps += [
  723. "//headless:headless_non_renderer",
  724. "//headless:headless_tests",
  725. ]
  726. }
  727. if (enable_vr) {
  728. deps += [
  729. "//chrome/browser/vr:vr_common_perftests",
  730. "//chrome/browser/vr:vr_common_unittests",
  731. "//chrome/browser/vr:vr_pixeltests",
  732. ]
  733. if (!is_android) {
  734. deps += [ "//tools/perf/contrib/vr_benchmarks:vr_perf_tests" ]
  735. } else {
  736. deps += [ "//chrome/browser/android/vr:vr_android_unittests" ]
  737. import("//tools/perf/chrome_telemetry_build/android_browser_types.gni")
  738. foreach(_target_suffix, telemetry_android_browser_target_suffixes) {
  739. deps += [
  740. "//tools/perf/contrib/vr_benchmarks:vr_perf_tests${_target_suffix}",
  741. ]
  742. }
  743. }
  744. }
  745. if (use_atk) {
  746. deps += [
  747. "//tools/accessibility/inspect:ax_dump_events",
  748. "//tools/accessibility/inspect:ax_dump_tree",
  749. ]
  750. }
  751. if (build_dawn_tests) {
  752. deps += [
  753. "//third_party/dawn/src/dawn/fuzzers:fuzzers",
  754. "//third_party/dawn/src/dawn/tests:dawn_end2end_tests",
  755. "//third_party/dawn/src/dawn/tests:dawn_unittests",
  756. "//third_party/dawn/src/tint:tint_unittests",
  757. "//third_party/dawn/src/tint/fuzzers",
  758. ]
  759. }
  760. # PFFFT.
  761. deps += [
  762. "//third_party/pffft:fuzzers",
  763. "//third_party/pffft:pffft_benchmark",
  764. "//third_party/pffft:pffft_unittest",
  765. ]
  766. # Minimal binaries to exercise Rust toolchain.
  767. deps += [ ":rust_build_tests" ]
  768. # More Rust targets.
  769. if (toolchain_has_rust) {
  770. deps += [
  771. "//mojo/public/rust",
  772. "//mojo/public/rust:mojo_rust_tests",
  773. "//third_party/rust/autocxx/chromium_integration/tests",
  774. # TODO(crbug.com/1291994): Determine whether it makes sense to build/run
  775. # this even on Android. If not, remove this and figure out how to run it
  776. # only on desktop testers.
  777. "//tools/crates/gnrt:gnrt_unittests",
  778. "//tools/crates/gnrt($host_toolchain)",
  779. ]
  780. }
  781. if (enable_rust) {
  782. deps += [ "//testing/rust_gtest_interop:rust_gtest_interop_unittests" ]
  783. }
  784. }
  785. # This group and the following exist to give targets for the waterfall to refer to.
  786. group("rust_build_tests") {
  787. testonly = true
  788. deps = [ "//build/rust/tests" ]
  789. }
  790. group("rust_autocxx_tests") {
  791. testonly = true
  792. deps = [ "//third_party/rust/autocxx/chromium_integration/tests" ]
  793. }
  794. # TODO(https://crbug.com/1112776): ensure remoting is functional on Linux builds with
  795. # other than X11 Ozone backends.
  796. if (enable_remoting && ((is_linux && ozone_platform_x11) ||
  797. ((is_chromeos || is_win) && !use_ozone))) {
  798. # On CQ, run the Traffic Annotation Auditor when a change affects one of these
  799. # targets.
  800. group("traffic_annotation_auditor_dependencies") {
  801. deps = [
  802. "//chrome:chrome",
  803. "//remoting/client",
  804. "//remoting/host:host",
  805. "//tools/traffic_annotation/summary:annotations_xml",
  806. ]
  807. if (is_win) {
  808. deps += [ "//chrome/chrome_cleaner:shipped_binaries" ]
  809. }
  810. }
  811. }
  812. if (is_chromeos_ash) {
  813. group("traffic_annotation_auditor_dependencies") {
  814. deps = [
  815. "//chrome",
  816. "//chromeos",
  817. "//tools/traffic_annotation/summary:annotations_xml",
  818. ]
  819. }
  820. }
  821. if (is_android) {
  822. # On CQ, run the Traffic Annotation Auditor when a change affects one of these
  823. # targets.
  824. group("traffic_annotation_auditor_dependencies") {
  825. deps = [
  826. "//chrome/android:chrome_public_apk",
  827. "//tools/traffic_annotation/summary:annotations_xml",
  828. ]
  829. }
  830. }
  831. if (is_fuchsia) {
  832. # TODO(https://crbug.com/731217): This can't practically be in //v8 without
  833. # duplicating all the Fuchsia running infrastructure there.
  834. cr_fuchsia_package("d8_fuchsia_pkg") {
  835. testonly = true
  836. binary = "//v8:d8"
  837. manifest = "//v8/gni/v8.cmx"
  838. package_name = "d8"
  839. }
  840. fuchsia_package_installer("d8_fuchsia") {
  841. testonly = true
  842. package = ":d8_fuchsia_pkg"
  843. package_name = "d8"
  844. }
  845. }
  846. # TODO(GYP_GONE): Figure out if we really need this target or if there's
  847. # some better way to specify things.
  848. if (is_win) {
  849. group("chrome_official_builder_no_unittests") {
  850. deps = [
  851. "//chrome/common/win:eventlog_provider",
  852. "//chrome/credential_provider",
  853. "//chrome/installer/gcapi",
  854. "//chrome/installer/mini_installer",
  855. "//chrome/updater/win:updater_zip",
  856. "//components/policy:pack_policy_templates",
  857. "//components/zucchini",
  858. "//courgette",
  859. "//courgette:copy_courgette_binaries",
  860. "//third_party/hyphenation-patterns",
  861. "//tools/metrics:metrics_metadata",
  862. ]
  863. if (target_cpu == "x86") {
  864. if (is_clang) {
  865. deps += [ "//courgette(//build/toolchain/win:win_clang_x64)" ]
  866. } else {
  867. deps += [ "//courgette(//build/toolchain/win:x64)" ]
  868. }
  869. }
  870. if (is_chrome_branded) {
  871. deps += [ "//remoting/host:remoting_host_installation" ]
  872. }
  873. }
  874. group("chrome_official_builder") {
  875. testonly = true
  876. deps = [
  877. ":chrome_official_builder_no_unittests",
  878. "//base:base_unittests",
  879. "//chrome/test:browser_tests",
  880. "//ipc:ipc_tests",
  881. "//media:media_unittests",
  882. "//media/midi:midi_unittests",
  883. "//net:net_unittests",
  884. "//printing:printing_unittests",
  885. "//sql:sql_unittests",
  886. "//third_party/breakpad:symupload($host_toolchain)",
  887. "//ui/base:ui_base_unittests",
  888. "//ui/gfx:gfx_unittests",
  889. "//ui/touch_selection:ui_touch_selection_unittests",
  890. "//ui/views:views_unittests",
  891. "//url:url_unittests",
  892. ]
  893. }
  894. }
  895. if (is_chromeos_ash) {
  896. # This group is used to collect all targets used when verifying a new version
  897. # of Chrome for Chrome OS.
  898. group("chromiumos_preflight") {
  899. testonly = true
  900. data_deps = [
  901. "//chrome",
  902. "//chrome/test/chromedriver",
  903. "//components/chromeos_camera:jpeg_decode_accelerator_unittest",
  904. "//components/exo/wayland:wayland_client_integration_tests",
  905. "//components/exo/wayland:wayland_client_perftests",
  906. "//components/exo/wayland:wayland_client_tests",
  907. "//components/policy/test_support:fake_dmserver",
  908. "//media:media_unittests",
  909. "//media/capture:capture_unittests",
  910. "//sandbox/linux:chrome_sandbox",
  911. "//sandbox/linux:sandbox_linux_unittests",
  912. "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
  913. "//third_party/dawn/src/dawn/tests:dawn_end2end_tests",
  914. "//third_party/dawn/src/dawn/tests:dawn_unittests",
  915. "//ui/ozone:ozone_integration_tests",
  916. # Blocked on https://github.com/catapult-project/catapult/issues/2297
  917. #"//third_party/catapult/telemetry:bitmaptools",
  918. "//tools/perf/clear_system_cache",
  919. "//ui/ozone/gl:ozone_gl_unittests",
  920. ]
  921. if (enable_plugins) {
  922. data_deps += [ "//ppapi/examples/video_decode" ]
  923. }
  924. if (use_v4l2_codec || use_vaapi) {
  925. data_deps += [
  926. "//components/chromeos_camera:jpeg_encode_accelerator_unittest",
  927. "//media/gpu:video_decode_accelerator_perf_tests",
  928. "//media/gpu:video_decode_accelerator_tests",
  929. "//media/gpu:video_encode_accelerator_perf_tests",
  930. "//media/gpu:video_encode_accelerator_tests",
  931. "//media/gpu/chromeos:image_processor_test",
  932. ]
  933. if (use_vaapi) {
  934. data_deps += [
  935. "//media/gpu/vaapi:decode_test",
  936. "//media/gpu/vaapi:vaapi_unittest",
  937. ]
  938. }
  939. if (use_v4l2_codec) {
  940. data_deps += [ "//media/gpu/v4l2:v4l2_stateless_decoder" ]
  941. }
  942. }
  943. }
  944. }
  945. group("gn_visibility") {
  946. deps = [
  947. "//build/config/sanitizers:options_sources",
  948. # "//third_party/pdfium:pdfium_embeddertests", # TODO(GYP): visibility?
  949. # "//third_party/pdfium:pdfium_unittests", # TODO(GYP): visibility?
  950. ]
  951. if (!is_ios) {
  952. deps += [ "//v8:postmortem-metadata" ]
  953. if (!v8_use_external_startup_data) {
  954. deps += [ "//v8:v8_snapshot" ]
  955. }
  956. }
  957. }
  958. if (!is_ios) {
  959. group("chromedriver") {
  960. testonly = true
  961. if (is_fuchsia || is_android) {
  962. # On Fuchsia and non-Cast Android, ChromeDriver runs on the host, not the
  963. # device.
  964. if (!is_cast_android) {
  965. deps = [ "//chrome/test/chromedriver:chromedriver($host_toolchain)" ]
  966. }
  967. if (is_android && !is_cast_android) {
  968. deps += [ "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk" ]
  969. }
  970. } else if (!is_castos) {
  971. deps = [
  972. "//chrome/test/chromedriver:chromedriver",
  973. "//chrome/test/chromedriver:chromedriver_unittests",
  974. ]
  975. }
  976. }
  977. # This group includes all of the targets needed to build and test Blink,
  978. # including running web tests (see below). This target is defined here because
  979. # previously //third_party/WebKit, now //third_party/blink, couldn't depend on
  980. # //content/shell. This might not longer be true, see
  981. # https://crbug.com/1018659.
  982. group("blink_tests") {
  983. testonly = true
  984. deps = [
  985. ":blink_web_tests",
  986. ":blink_wpt_tests",
  987. "//third_party/blink/public:all_blink",
  988. ]
  989. }
  990. # Web tests runner
  991. # third_party/blink/tools/run_web_tests.py
  992. group("run_web_tests") {
  993. testonly = true
  994. deps = [
  995. ":blink_web_tests",
  996. ":blink_wpt_tests",
  997. ]
  998. }
  999. if (!is_chromeos_ash && !is_ios && !is_fuchsia && !is_android && !is_castos) {
  1000. # WPT Webdriver tests runner
  1001. # chrome/test/chromedriver/test/run_webdriver_tests.py
  1002. script_test("webdriver_wpt_tests") {
  1003. # The script is wrapped in testing/xvfb.py; the actual
  1004. # run_webdriver_tests.py script is passed as an arg in gn_isolate_map.pyl
  1005. script = "//testing/xvfb.py"
  1006. data = [
  1007. "//build/skia_gold_common/",
  1008. "//chrome/test/chromedriver/chrome_paths.py",
  1009. "//chrome/test/chromedriver/server/server.py",
  1010. "//chrome/test/chromedriver/test/run_webdriver_tests.py",
  1011. "//chrome/test/chromedriver/util.py",
  1012. "//third_party/blink/tools/blinkpy/",
  1013. "//third_party/blink/web_tests/external/wpt/webdriver/",
  1014. "//third_party/blink/web_tests/VirtualTestSuites",
  1015. "//third_party/blink/web_tests/WebDriverExpectations",
  1016. "//third_party/pywebsocket3/src/mod_pywebsocket/",
  1017. "//third_party/wpt_tools/",
  1018. ]
  1019. data_deps = [
  1020. "//chrome:chrome",
  1021. "//chrome/test/chromedriver",
  1022. "//testing:test_scripts_shared",
  1023. "//third_party/catapult/third_party/typ",
  1024. ]
  1025. if (is_win) {
  1026. data_deps += [ "//build/win:copy_cdb_to_output" ]
  1027. }
  1028. }
  1029. script_test("wpt_tests_isolate") {
  1030. script = "//testing/scripts/run_wpt_tests.py"
  1031. data_deps = [
  1032. "//chrome:chrome",
  1033. "//chrome/test/chromedriver",
  1034. "//third_party/blink/tools:wpt_tests_isolate",
  1035. "//tools/imagediff",
  1036. ]
  1037. }
  1038. }
  1039. group("blink_web_tests_support_data") {
  1040. testonly = true
  1041. data_deps = [
  1042. ":layout_test_data_mojo_bindings",
  1043. ":layout_test_data_mojo_bindings_lite",
  1044. "//content/shell:content_shell",
  1045. "//content/test:mojo_bindings_web_test_mojom_js_data_deps",
  1046. "//content/test:mojo_web_test_bindings_js_data_deps",
  1047. "//device/bluetooth/public/mojom:fake_bluetooth_interfaces_js_data_deps",
  1048. "//device/vr/public/mojom:vr_service_js_data_deps",
  1049. "//media/capture/mojom:image_capture_js_data_deps",
  1050. "//media/midi:mojo_js_data_deps",
  1051. "//mojo/public/interfaces/bindings/tests:test_data_deps",
  1052. "//mojo/public/js/ts/bindings/tests:test_interfaces_js_data_deps",
  1053. "//mojo/public/mojom/base:base_js_data_deps",
  1054. "//services/device/public/mojom:generic_sensor_js_data_deps",
  1055. "//services/device/public/mojom:mojom_js_data_deps",
  1056. "//services/device/public/mojom:usb_js_data_deps",
  1057. "//services/shape_detection/public/mojom:mojom_js_data_deps",
  1058. "//skia/public/mojom:mojom_js_data_deps",
  1059. "//testing/buildbot/filters:blink_web_tests_filter",
  1060. "//third_party/blink/public:blink_devtools_frontend_resources_files",
  1061. "//third_party/blink/public:blink_devtools_inspector_resources",
  1062. "//third_party/blink/public/mojom:mojom_platform_js_data_deps",
  1063. "//third_party/blink/renderer/core:js_files_for_form_controls_web_tests",
  1064. "//third_party/catapult/third_party/typ",
  1065. "//third_party/hyphenation-patterns:test_data",
  1066. "//third_party/mesa_headers",
  1067. "//tools/imagediff",
  1068. "//ui/base:goldctl",
  1069. ]
  1070. if (is_android) {
  1071. data_deps += [
  1072. "//third_party/breakpad:breakpad_unittests",
  1073. "//third_party/breakpad:dump_syms",
  1074. "//third_party/breakpad:microdump_stackwalk",
  1075. "//third_party/breakpad:minidump_dump",
  1076. "//third_party/breakpad:minidump_stackwalk",
  1077. "//third_party/breakpad:symupload",
  1078. "//tools/android/forwarder2",
  1079. ]
  1080. } else {
  1081. data_deps += [ "//content/web_test:web_test_common_mojom_js_data_deps" ]
  1082. }
  1083. if (!is_win && !is_android) {
  1084. data_deps +=
  1085. [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
  1086. }
  1087. if (is_mac) {
  1088. data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
  1089. }
  1090. if (is_linux || is_chromeos) {
  1091. data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
  1092. }
  1093. if (is_fuchsia) {
  1094. data_deps += [
  1095. "//build/config/fuchsia:deployment_resources",
  1096. "//content/shell:content_shell_fuchsia",
  1097. "//content/shell:content_shell_pkg__archive-manifest",
  1098. "//content/shell:content_shell_pkg__archive-metadata",
  1099. ]
  1100. }
  1101. data = [
  1102. "//build/skia_gold_common/",
  1103. "//testing/scripts/common.py",
  1104. "//testing/scripts/run_isolated_script_test.py",
  1105. "//testing/xvfb.py",
  1106. "//third_party/blink/tools/",
  1107. "//third_party/blink/web_tests/resources/",
  1108. "//third_party/pywebsocket3/src/mod_pywebsocket/",
  1109. "//third_party/test_fonts/test_fonts/",
  1110. "//third_party/wpt_tools/",
  1111. ]
  1112. if (is_win) {
  1113. data += [
  1114. "//third_party/apache-win32/",
  1115. "//third_party/perl/perl/",
  1116. ]
  1117. data_deps += [ "//build/win:copy_cdb_to_output" ]
  1118. }
  1119. if (is_mac) {
  1120. data += [
  1121. "//third_party/apache-mac/",
  1122. "//third_party/apache-mac-arm64/",
  1123. ]
  1124. }
  1125. if (is_linux || is_fuchsia) {
  1126. data += [ "//third_party/apache-linux/" ]
  1127. }
  1128. if (is_android) {
  1129. data += [
  1130. "//third_party/catapult/",
  1131. "//build/android/",
  1132. ]
  1133. }
  1134. }
  1135. _common_web_test_script = "//testing/scripts/run_isolated_script_test.py"
  1136. _common_web_test_args = [ "@WrappedPath(" + rebase_path(
  1137. "//third_party/blink/tools/run_web_tests.py",
  1138. root_build_dir) + ")" ]
  1139. if (is_debug) {
  1140. _common_web_test_args += [ "--debug" ]
  1141. } else {
  1142. _common_web_test_args += [ "--release" ]
  1143. if (dcheck_always_on) {
  1144. _common_web_test_args += [ "--timeout-ms=12000" ]
  1145. }
  1146. }
  1147. if (is_android) {
  1148. _common_web_test_args += [
  1149. "--platform",
  1150. "android",
  1151. ]
  1152. }
  1153. _common_web_test_args += [
  1154. "--seed",
  1155. "4",
  1156. "--debug-rwt-logging",
  1157. "--no-show-results",
  1158. "--zero-tests-executed-ok",
  1159. "--clobber-old-results",
  1160. "--exit-after-n-failures",
  1161. "5000",
  1162. "--exit-after-n-crashes-or-timeouts",
  1163. "100",
  1164. ]
  1165. # https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_tests.md
  1166. script_test("blink_web_tests") {
  1167. script = _common_web_test_script
  1168. args = _common_web_test_args
  1169. data_deps = [ ":blink_web_tests_support_data" ]
  1170. data = [
  1171. "//third_party/blink/perf_tests/",
  1172. "//third_party/blink/web_tests/SmokeTests/Default.txt",
  1173. "//third_party/blink/web_tests/VirtualTestSuites",
  1174. # List all test expectations here
  1175. "//third_party/blink/web_tests/ASANExpectations",
  1176. "//third_party/blink/web_tests/LeakExpectations",
  1177. "//third_party/blink/web_tests/MSANExpectations",
  1178. "//third_party/blink/web_tests/NeverFixTests",
  1179. "//third_party/blink/web_tests/SlowTests",
  1180. "//third_party/blink/web_tests/StaleTestExpectations",
  1181. "//third_party/blink/web_tests/TestExpectations",
  1182. "//third_party/blink/web_tests/WebDriverExpectations",
  1183. "//third_party/blink/web_tests/WebGPUExpectations",
  1184. # Generic baselines
  1185. "//third_party/blink/web_tests/platform/generic/",
  1186. # === List Test Cases folders here ===
  1187. "//third_party/blink/web_tests/accessibility/",
  1188. "//third_party/blink/web_tests/android/",
  1189. "//third_party/blink/web_tests/animations/",
  1190. "//third_party/blink/web_tests/app_banner/",
  1191. "//third_party/blink/web_tests/bindings/",
  1192. "//third_party/blink/web_tests/clipboard/",
  1193. "//third_party/blink/web_tests/compositing/",
  1194. "//third_party/blink/web_tests/crypto/",
  1195. "//third_party/blink/web_tests/css-parser/",
  1196. "//third_party/blink/web_tests/css1/",
  1197. "//third_party/blink/web_tests/css2.1/",
  1198. "//third_party/blink/web_tests/css3/",
  1199. "//third_party/blink/web_tests/cssom/",
  1200. "//third_party/blink/web_tests/custom-elements/",
  1201. "//third_party/blink/web_tests/custom-properties/",
  1202. "//third_party/blink/web_tests/dark-mode/",
  1203. "//third_party/blink/web_tests/document-transition/",
  1204. "//third_party/blink/web_tests/dom/",
  1205. "//third_party/blink/web_tests/editing/",
  1206. "//third_party/blink/web_tests/fast/",
  1207. "//third_party/blink/web_tests/fonts/",
  1208. "//third_party/blink/web_tests/fragmentation/",
  1209. "//third_party/blink/web_tests/fullscreen/",
  1210. "//third_party/blink/web_tests/gamepad/",
  1211. "//third_party/blink/web_tests/harness-tests/",
  1212. "//third_party/blink/web_tests/hittesting/",
  1213. "//third_party/blink/web_tests/html/",
  1214. "//third_party/blink/web_tests/html5lib/",
  1215. "//third_party/blink/web_tests/http/",
  1216. "//third_party/blink/web_tests/idle-callback/",
  1217. "//third_party/blink/web_tests/ietestcenter/",
  1218. "//third_party/blink/web_tests/images/",
  1219. "//third_party/blink/web_tests/inspector-protocol/",
  1220. "//third_party/blink/web_tests/intersection-observer/",
  1221. "//third_party/blink/web_tests/jquery/",
  1222. "//third_party/blink/web_tests/js/",
  1223. "//third_party/blink/web_tests/lifecycle/",
  1224. "//third_party/blink/web_tests/loader/",
  1225. "//third_party/blink/web_tests/media/",
  1226. "//third_party/blink/web_tests/media_capabilities/",
  1227. "//third_party/blink/web_tests/mhtml/",
  1228. "//third_party/blink/web_tests/navigator_language/",
  1229. "//third_party/blink/web_tests/navigator_webdriver/",
  1230. "//third_party/blink/web_tests/netinfo/",
  1231. "//third_party/blink/web_tests/overflow/",
  1232. "//third_party/blink/web_tests/paint/",
  1233. "//third_party/blink/web_tests/payments/",
  1234. "//third_party/blink/web_tests/permissionclient/",
  1235. "//third_party/blink/web_tests/plugins/",
  1236. "//third_party/blink/web_tests/pointer-lock/",
  1237. "//third_party/blink/web_tests/print_testharness/",
  1238. "//third_party/blink/web_tests/printing/",
  1239. "//third_party/blink/web_tests/register-protocol-handler/",
  1240. "//third_party/blink/web_tests/regress/",
  1241. "//third_party/blink/web_tests/resize-observer/",
  1242. "//third_party/blink/web_tests/resources/",
  1243. "//third_party/blink/web_tests/rootscroller/",
  1244. "//third_party/blink/web_tests/screen_orientation/",
  1245. "//third_party/blink/web_tests/scrollbars/",
  1246. "//third_party/blink/web_tests/scrollingcoordinator/",
  1247. "//third_party/blink/web_tests/security/",
  1248. "//third_party/blink/web_tests/handwriting/",
  1249. "//third_party/blink/web_tests/shadow-dom/",
  1250. "//third_party/blink/web_tests/storage/",
  1251. "//third_party/blink/web_tests/svg/",
  1252. "//third_party/blink/web_tests/synthetic_gestures/",
  1253. "//third_party/blink/web_tests/tables/",
  1254. "//third_party/blink/web_tests/test_runner/",
  1255. "//third_party/blink/web_tests/third_party/",
  1256. "//third_party/blink/web_tests/timezonechange/",
  1257. "//third_party/blink/web_tests/touchadjustment/",
  1258. "//third_party/blink/web_tests/transforms/",
  1259. "//third_party/blink/web_tests/transitions/",
  1260. "//third_party/blink/web_tests/traversal/",
  1261. "//third_party/blink/web_tests/typedcssom/",
  1262. "//third_party/blink/web_tests/vibration/",
  1263. "//third_party/blink/web_tests/virtual/",
  1264. "//third_party/blink/web_tests/virtualkeyboard/",
  1265. "//third_party/blink/web_tests/wake-lock/",
  1266. "//third_party/blink/web_tests/wasm/",
  1267. "//third_party/blink/web_tests/webaudio/",
  1268. "//third_party/blink/web_tests/webexposed/",
  1269. "//third_party/blink/web_tests/webgpu/",
  1270. "//third_party/blink/web_tests/xmlviewer/",
  1271. # === Test Case Folders Ends ===
  1272. ]
  1273. if (is_win || is_linux || is_fuchsia) {
  1274. data += [
  1275. "//third_party/blink/web_tests/platform/win/",
  1276. "//third_party/blink/web_tests/platform/win10/",
  1277. ]
  1278. if (is_linux || is_fuchsia) {
  1279. data += [ "//third_party/blink/web_tests/platform/linux/" ]
  1280. }
  1281. if (is_fuchsia) {
  1282. data += [ "//third_party/blink/web_tests/platform/fuchsia/" ]
  1283. }
  1284. } else if (is_mac) {
  1285. data += [
  1286. "//third_party/blink/web_tests/SmokeTests/Mac.txt",
  1287. "//third_party/blink/web_tests/platform/mac/",
  1288. "//third_party/blink/web_tests/platform/mac-mac10.13/",
  1289. "//third_party/blink/web_tests/platform/mac-mac10.14/",
  1290. "//third_party/blink/web_tests/platform/mac-mac10.15/",
  1291. "//third_party/blink/web_tests/platform/mac-mac11/",
  1292. "//third_party/blink/web_tests/platform/mac-mac11-arm64/",
  1293. "//third_party/blink/web_tests/platform/mac-mac12-arm64/",
  1294. ]
  1295. }
  1296. # flag-specific tests only runs on linux as of now
  1297. if (is_linux) {
  1298. data += [
  1299. "//third_party/blink/web_tests/FlagSpecificConfig",
  1300. "//third_party/blink/web_tests/FlagExpectations/",
  1301. "//third_party/blink/web_tests/flag-specific/",
  1302. ]
  1303. }
  1304. }
  1305. script_test("blink_wpt_tests") {
  1306. script = _common_web_test_script
  1307. args = _common_web_test_args
  1308. data_deps = [ ":blink_web_tests_support_data" ]
  1309. data = [
  1310. "//third_party/blink/perf_tests/",
  1311. "//third_party/blink/web_tests/SmokeTests/Default.txt",
  1312. "//third_party/blink/web_tests/VirtualTestSuites",
  1313. # List all test expectations here
  1314. "//third_party/blink/web_tests/ASANExpectations",
  1315. "//third_party/blink/web_tests/LeakExpectations",
  1316. "//third_party/blink/web_tests/MSANExpectations",
  1317. "//third_party/blink/web_tests/NeverFixTests",
  1318. "//third_party/blink/web_tests/SlowTests",
  1319. "//third_party/blink/web_tests/StaleTestExpectations",
  1320. "//third_party/blink/web_tests/TestExpectations",
  1321. "//third_party/blink/web_tests/WebDriverExpectations",
  1322. "//third_party/blink/web_tests/WebGPUExpectations",
  1323. # Generic baselines
  1324. "//third_party/blink/web_tests/platform/generic/",
  1325. # === List Test Cases folders here ===
  1326. "//third_party/blink/web_tests/external/",
  1327. "//third_party/blink/web_tests/wpt_internal/",
  1328. # === Test Case Folders Ends ===
  1329. ]
  1330. if (is_win || is_linux || is_fuchsia) {
  1331. data += [
  1332. "//third_party/blink/web_tests/platform/win/",
  1333. "//third_party/blink/web_tests/platform/win10/",
  1334. ]
  1335. if (is_linux || is_fuchsia) {
  1336. data += [ "//third_party/blink/web_tests/platform/linux/" ]
  1337. }
  1338. if (is_fuchsia) {
  1339. data += [ "//third_party/blink/web_tests/platform/fuchsia/" ]
  1340. }
  1341. } else if (is_mac) {
  1342. data += [
  1343. "//third_party/blink/web_tests/SmokeTests/Mac.txt",
  1344. "//third_party/blink/web_tests/platform/mac/",
  1345. "//third_party/blink/web_tests/platform/mac-mac10.13/",
  1346. "//third_party/blink/web_tests/platform/mac-mac10.14/",
  1347. "//third_party/blink/web_tests/platform/mac-mac10.15/",
  1348. "//third_party/blink/web_tests/platform/mac-mac11-arm64/",
  1349. ]
  1350. }
  1351. # flag-specific tests only runs on linux as of now
  1352. if (is_linux) {
  1353. data += [
  1354. "//third_party/blink/web_tests/FlagSpecificConfig",
  1355. "//third_party/blink/web_tests/FlagExpectations/",
  1356. "//third_party/blink/web_tests/flag-specific/",
  1357. ]
  1358. }
  1359. }
  1360. script_test("devtools_web_tests") {
  1361. # This target differs from :blink_web_tests in that it uses the
  1362. # same test harness but runs an entirely different set of tests
  1363. # and doesn't have a dependency on the web_test directory at all.
  1364. script = _common_web_test_script
  1365. args = _common_web_test_args + [
  1366. "--layout-tests-directory=@WrappedPath(" + rebase_path(
  1367. "//third_party/devtools-frontend/src/test/webtests",
  1368. root_out_dir) + ")",
  1369. "http/tests/devtools",
  1370. ]
  1371. data_deps = [ ":blink_web_tests_support_data" ]
  1372. data = [ "//third_party/devtools-frontend/src/test/webtests/" ]
  1373. }
  1374. script_test("webgpu_blink_web_tests") {
  1375. # This target differs from :blink_web_tests in that it uses the same
  1376. # test harness and a few additional flags but, more importantly, only runs
  1377. # the web_tests/wpt_internal/webgpu tests, so it doesn't have a data
  1378. # dependency on the whole web_test directory.
  1379. script = _common_web_test_script
  1380. args = _common_web_test_args
  1381. if (is_asan) {
  1382. args += [ "--timeout-ms=30000" ]
  1383. }
  1384. args += [
  1385. "--ignore-default-expectations",
  1386. "--additional-expectations",
  1387. "@WrappedPath(../../third_party/blink/web_tests/WebGPUExpectations)",
  1388. "--isolated-script-test-filter=wpt_internal/webgpu/web_platform/reftests/*",
  1389. ]
  1390. data_deps = [
  1391. ":blink_web_tests_support_data",
  1392. "//third_party/webgpu-cts",
  1393. ]
  1394. data = [
  1395. "//third_party/blink/web_tests/external/wpt/common/",
  1396. "//third_party/blink/web_tests/external/wpt/resources/",
  1397. "//third_party/blink/web_tests/FlagSpecificConfig",
  1398. "//third_party/blink/web_tests/VirtualTestSuites",
  1399. "//third_party/blink/web_tests/WebGPUExpectations",
  1400. "//third_party/blink/web_tests/wpt_internal/",
  1401. "//third_party/webgpu-cts/scripts/",
  1402. ]
  1403. }
  1404. copy("layout_test_data_mojo_bindings") {
  1405. testonly = true
  1406. sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings.js" ]
  1407. outputs =
  1408. [ "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings.js" ]
  1409. deps = [ "//mojo/public/js:bindings" ]
  1410. }
  1411. copy("layout_test_data_mojo_bindings_lite") {
  1412. testonly = true
  1413. sources = [ "$root_gen_dir/mojo/public/js/mojo_bindings_lite.js" ]
  1414. outputs = [
  1415. "$root_gen_dir/layout_test_data/mojo/public/js/mojo_bindings_lite.js",
  1416. ]
  1417. deps = [ "//mojo/public/js:bindings_lite" ]
  1418. }
  1419. script_test("blink_python_tests") {
  1420. script = "//testing/scripts/run_isolated_script_test.py"
  1421. args = [ "@WrappedPath(" +
  1422. rebase_path("//third_party/blink/tools/run_blinkpy_tests.py",
  1423. root_build_dir) + ")" ]
  1424. data = [
  1425. # These tests use //build/android/devil_chromium.py even when !is_android,
  1426. # so cannot use the helpers in //build/android (they assert(is_android)).
  1427. "//build/android/",
  1428. "//build/gn_helpers.py",
  1429. "//build/config/gclient_args.gni",
  1430. "//build/skia_gold_common/",
  1431. "//components/crash/content/tools/generate_breakpad_symbols.py",
  1432. "//testing/unexpected_passes_common/",
  1433. "//third_party/blink/renderer/bindings/scripts/",
  1434. "//third_party/blink/renderer/build/scripts/",
  1435. "//third_party/blink/tools/",
  1436. "//third_party/blink/web_tests/ASANExpectations",
  1437. "//third_party/blink/web_tests/LeakExpectations",
  1438. "//third_party/blink/web_tests/MSANExpectations",
  1439. "//third_party/blink/web_tests/NeverFixTests",
  1440. "//third_party/blink/web_tests/SlowTests",
  1441. "//third_party/blink/web_tests/StaleTestExpectations",
  1442. "//third_party/blink/web_tests/TestExpectations",
  1443. "//third_party/blink/web_tests/VirtualTestSuites",
  1444. "//third_party/catapult/common/py_utils/",
  1445. "//third_party/catapult/devil/",
  1446. "//third_party/catapult/dependency_manager/",
  1447. "//third_party/catapult/third_party/typ/",
  1448. "//third_party/depot_tools/pylint-1.5",
  1449. "//third_party/depot_tools/pylint_main.py",
  1450. "//third_party/depot_tools/pylintrc",
  1451. "//third_party/ply/",
  1452. "//third_party/wpt_tools/",
  1453. "//tools/idl_parser/",
  1454. ]
  1455. data_deps = [ "//ui/base:goldctl" ]
  1456. }
  1457. }
  1458. # TODO(cassew): Add more OS's that don't support x86.
  1459. is_valid_x86_target =
  1460. target_os != "ios" && target_os != "mac" &&
  1461. (target_os != "linux" || use_libfuzzer || !build_with_chromium)
  1462. # Note: v8_target_cpu == arm allows using the V8 arm simulator on x86 for fuzzing.
  1463. assert(
  1464. is_valid_x86_target || target_cpu != "x86" || v8_target_cpu == "arm",
  1465. "'target_cpu=x86' is not supported for 'target_os=$target_os'. Consider omitting 'target_cpu' (default) or using 'target_cpu=x64' instead.")
  1466. group("chromium_builder_perf") {
  1467. testonly = true
  1468. if (!is_ios && !is_android && !is_castos) {
  1469. data_deps = [
  1470. "//cc:cc_perftests",
  1471. "//chrome/test:load_library_perf_tests",
  1472. "//chrome/test:performance_test_suite",
  1473. "//components/tracing:tracing_perftests",
  1474. "//gpu:command_buffer_perftests",
  1475. "//gpu:gpu_perftests",
  1476. "//media:media_perftests",
  1477. "//tools/perf/chrome_telemetry_build:telemetry_chrome_test",
  1478. ]
  1479. if (!is_chromeos_ash) {
  1480. data_deps += [ "//chrome/test:performance_browser_tests" ]
  1481. }
  1482. if (!is_win) {
  1483. data_deps +=
  1484. [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
  1485. }
  1486. }
  1487. if ((is_linux && !is_castos) || is_chromeos_lacros) {
  1488. if (is_official_build) {
  1489. # In GN builds, this is controlled by the 'linux_dump_symbols'
  1490. # flag, which defaults to 1 for official builds. For now,
  1491. # we skip the separate flag and just key off of is_official_build.
  1492. data_deps += [ "//chrome:linux_symbols" ]
  1493. }
  1494. data_deps += [ "//tools/perf/clear_system_cache" ]
  1495. }
  1496. if (is_win) {
  1497. data_deps += [
  1498. "//chrome/installer/mini_installer:mini_installer",
  1499. "//components:components_perftests",
  1500. "//third_party/angle/src/tests:angle_perftests",
  1501. ]
  1502. }
  1503. # An `if (is_fuchsia)` condition in //chrome/test/BUILD.gn prevents this
  1504. # target from being defined.
  1505. # TODO(crbug.com/1310086): Resolve that and remove this exception.
  1506. if (is_fuchsia) {
  1507. data_deps -= [ "//chrome/test:performance_test_suite" ]
  1508. }
  1509. }
  1510. if (!is_ios && !is_android && !is_castos) {
  1511. group("chromium_builder_asan") {
  1512. testonly = true
  1513. deps = [
  1514. "//chrome:chrome",
  1515. "//content/shell:content_shell",
  1516. "//third_party/blink/public/mojom:mojom_modules_js",
  1517. "//v8:d8",
  1518. ]
  1519. if (!is_win) {
  1520. deps += [ "//skia:filter_fuzz_stub" ]
  1521. }
  1522. if (enable_ipc_fuzzer && !is_component_build) {
  1523. deps += [ "//tools/ipc_fuzzer:ipc_fuzzer_all" ]
  1524. }
  1525. if (!is_chromeos_ash) {
  1526. deps += [
  1527. "//third_party/pdfium/samples:pdfium_test",
  1528. "//v8:v8_shell($v8_snapshot_toolchain)",
  1529. ]
  1530. }
  1531. if (!is_component_build) {
  1532. # See https://bugs.chromium.org/p/chromium/issues/detail?id=942546#c11.
  1533. deps += [
  1534. "//third_party/webrtc/rtc_tools:rtp_generator",
  1535. "//third_party/webrtc/rtc_tools:video_replay",
  1536. ]
  1537. }
  1538. if (build_dawn_tests) {
  1539. deps += [ "//third_party/dawn/src/tint/fuzzers:fuzzers" ]
  1540. }
  1541. }
  1542. }
  1543. if (is_android) {
  1544. group("optimize_gn_gen") {
  1545. deps = [
  1546. # These run expensive scripts in non-default toolchains. Generally, host
  1547. # toolchain targets are loaded in the later part of the run, and the
  1548. # result is they push out the end of generation. By preloading these, the
  1549. # scripts can be parallelized with the rest of the load.
  1550. "//build/config/linux(//build/toolchain/linux:clang_x64)",
  1551. "//build/config/posix(//build/toolchain/linux:clang_x64)",
  1552. # Include x86 toolchains as well since V8 uses them for 32-bit snapshot
  1553. # generation.
  1554. "//build/config/linux(//build/toolchain/linux:clang_x86)",
  1555. "//build/config/posix(//build/toolchain/linux:clang_x86)",
  1556. ]
  1557. }
  1558. }
  1559. if (enable_js_type_check) {
  1560. group("webui_closure_compile") {
  1561. testonly = true
  1562. data_deps = [
  1563. "components/neterror/resources:closure_compile",
  1564. "components/security_interstitials:closure_compile",
  1565. "mojo/public/tools/bindings/generators/js_templates/lite/test:closure_compile",
  1566. "ui/webui/resources:closure_compile",
  1567. ]
  1568. if (is_chromeos_ash) {
  1569. data_deps += [
  1570. "ash/webui:closure_compile",
  1571. "ui/file_manager:closure_compile",
  1572. ]
  1573. }
  1574. if (!is_castos) {
  1575. data_deps += [
  1576. "chrome/browser/resources:closure_compile",
  1577. "chrome/test:closure_compile",
  1578. ]
  1579. }
  1580. }
  1581. }
  1582. # Write debug logs to gn_logs.txt.
  1583. _lines = [
  1584. "Generated during 'gn gen' by //BUILD.gn.",
  1585. "",
  1586. ] + build_gn_logs
  1587. # GN evaluates each .gn file once per toolchain, so restricting to default
  1588. # toolchain will ensure write_file() is called only once.
  1589. assert(current_toolchain == default_toolchain)
  1590. write_file("$root_build_dir/gn_logs.txt", _lines)