forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD.gn
651 lines (573 loc) · 22.1 KB
/
BUILD.gn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//base/android/jni_generator/jni_exception_list.gni")
import("//build/buildflag_header.gni")
import("//build/config/features.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//chromecast/build/tests/cast_test.gni")
import("//chromecast/chromecast.gni")
import("//media/media_options.gni")
import("//tools/grit/repack.gni")
import("//ui/ozone/ozone.gni")
import("//v8/gni/v8.gni")
if (is_android) {
import("//build/config/android/rules.gni")
}
declare_args() {
cast_test_extra_flags = ""
}
# Depends on all non-test targets that should be built by the Chromecast
# internal build infrastructure.
group("all") {
deps = []
if (is_android && chromecast_branding == "public") {
deps += [ ":cast_shell_apk" ]
}
if (!is_android) {
deps += [ ":cast_shell" ]
}
if (is_linux) {
deps += [ "//chromecast/tracing" ]
}
if (chromecast_branding != "public") {
deps += [ "//chromecast/internal:all" ]
}
# No other targets should depend on this target, since it's just a convenience
# target for the Chromecast internal build infrastructure.
visibility = []
testonly = true
}
# This is a config which is applied on all cast_* targets (which should be all
# code under chromecast/).
config("cast_config") {
}
# A list of all public test() binaries. This is an organizational target that
# cannot be depended upon or built directly. Build cast_test_lists instead.
cast_test_group("cast_tests") {
filters = []
tests = [
"//base:base_unittests",
"//cc:cc_unittests",
"//chromecast/base:cast_base_unittests",
"//chromecast/base/component:cast_component_unittests",
"//chromecast/crypto:cast_crypto_unittests",
"//chromecast/device/bluetooth:cast_bluetooth_unittests",
"//chromecast/media:cast_media_unittests",
"//chromecast/net:cast_net_unittests",
"//chromecast/system/reboot:cast_reboot_unittests",
"//content/test:content_unittests",
"//crypto:crypto_unittests",
"//media:media_unittests",
"//media/midi:midi_unittests",
"//net:net_unittests",
"//sql:sql_unittests",
"//storage:storage_unittests",
"//third_party/cacheinvalidation:cacheinvalidation_unittests",
"//ui/base:ui_base_unittests",
]
if (!is_cast_audio_only) {
tests += [ "//gpu:gpu_unittests" ]
if (use_aura) {
tests += [ "//chromecast/graphics:cast_graphics_unittests" ]
}
}
if (is_linux) {
tests += [
"//chromecast/crash:cast_crash_unittests",
"//sandbox/linux:sandbox_linux_unittests",
]
}
if (is_linux || is_fuchsia) {
tests += [
"//chromecast/media/cma/backend:cast_audio_backend_unittests",
"//chromecast/media/cma/backend:cast_av_sync_backend_unittests",
]
}
if (is_android && is_cast_using_cma_backend) {
tests += [ "//chromecast/media/cma/backend/android:cast_android_cma_backend_unittests" ]
}
if (!is_android) {
tests += [
":cast_shell_browsertests",
":cast_shell_unittests",
"//ipc:ipc_tests",
"//url:url_unittests",
]
if (!is_fuchsia) {
tests += [ "//jingle:jingle_unittests" ]
}
cast_media_unittests_filter = {
test_name = "cast_media_unittests"
# TODO(almasrymina) : Track this test as a separate bug
# (internal : b/115400220)
gtest_excludes = [ "AudioVideoPipelineDeviceTest.Mp4Playback" ]
# --test-launcher-jobs=1 => so internal code can bind to port
args = [ "--test-launcher-jobs=1" ]
}
filters += [ cast_media_unittests_filter ]
cast_shell_browsertests_filter = {
test_name = "cast_shell_browsertests"
# --enable-local-file-accesses => to load sample media files
# --test-launcher-jobs=1 => so internal code can bind to port
args = [
"--no-sandbox",
"--enable-local-file-accesses",
"--test-launcher-jobs=1",
]
gtest_excludes = []
# TODO(b/112440248): This test was failing:
# * On v1 and Cast Audio devices since 2017-03-15.
# * On desktop builds since 2018-08-22
# Also see: b/36238710, b/36239051, hotlist/461351
gtest_excludes += [ "RendererPrelauncherTest.ReusedRenderer" ]
if (!is_cast_desktop_build) {
args += [ "--use-gpu-in-tests" ]
# TODO(derekjchow): Make these tests pass on Chromecast devices.
# Once all of the CastMediaBlockerTest.* have been un-DISABLEd and
# are running successfully, revisit these tests and see if they pass
# on devices. (crbug/665118, internal b/32023194)
gtest_excludes += [
"CastMediaBlockerBrowserTest.Video_BlockUnblock",
"CastMediaBlockerBrowserTest.Audio_BlockUnblock",
]
}
if (!is_cast_desktop_build && !is_cast_audio_only && !enable_assistant) {
# TODO(mbjorge): The VideoPlaybackMp4 test is failing on v1 devices.
# Temporarily disable it as part of an effort to re-green the unittests.
# Re-enable once the tests have been fixed. Limitations in the filter
# system mean this is getting temporarily disabled on all video devices,
# though it is only failing on v1.
# b/36723698, hotlist/461351
gtest_excludes += [ "CastNavigationBrowserTest.VideoPlaybackMp4" ]
}
# TODO(mbjorge): Temporarily disable AudioPlaybackWavPcm because it is
# failing on device. As part of an effort to re-green the unittests,
# current (2017-03-15) failures are being disabled to get back to a
# green state. Re-enable once the tests have been fixed.
# b/36239152, hotlist/461351
if (enable_assistant && !is_cast_desktop_build) {
gtest_excludes += [ "CastNavigationBrowserTest.AudioPlaybackWavPcm" ]
}
}
filters += [ cast_shell_browsertests_filter ]
ipc_tests_filter = {
test_name = "ipc_tests"
# --test-launcher-jobs=1 => so internal code can bind to port
args = [ "--test-launcher-jobs=1" ]
}
filters += [ ipc_tests_filter ]
url_unittests_filter = {
test_name = "url_unittests"
if (target_os == "linux" && !is_cast_desktop_build) {
# DoAppendUTF8Invalid fails because of dcheck_always_on flag in Eng builds
gtest_excludes = [ "URLCanonTest.DoAppendUTF8Invalid" ]
}
}
filters += [ url_unittests_filter ]
}
base_unittests_filter = {
test_name = "base_unittests"
gtest_excludes = []
if (target_os == "linux") {
if (is_cast_desktop_build) {
# Disable PartitionAllocDeathTest.* (b/67975693)
gtest_excludes += [ "PartitionAllocDeathTest.*" ]
} else {
# Disable ProcessMetricsTest.GetNumberOfThreads (b/15610509)
# Disable ProcessUtilTest.* (need to define OS_ANDROID)
# Disable StackContainer.BufferAlignment (don't support 16-byte alignment)
# Disable SystemMetrics2Test.GetSystemMemoryInfo (buffers>0 can't be guaranteed)
# Disable PostTasksViaTaskRunner/* to green up devices (b/62246873)
# Disable WorkerDetaches to green up devices (b/62246873)
gtest_excludes += [
"ProcessMetricsTest.GetNumberOfThreads",
"ProcessUtilTest.*",
"StackContainer.BufferAlignment",
"SystemMetrics2Test.GetSystemMemoryInfo",
"OneTraitsExecutionModePair/TaskSchedulerImplTest.PostTasksViaTaskRunner/*",
"TaskSchedulerWorkerTest.WorkerDetaches",
]
}
if (is_cast_audio_only) {
# Also disable TimeFormattingTest on audio-only builds, since we don't
# include the necessary info in icudtl.dat.
gtest_excludes += [ "TimeFormattingTest.*" ]
}
}
}
filters += [ base_unittests_filter ]
cc_unittests_filter = {
test_name = "cc_unittests"
# Temporarily disable all test cases (b/113324890)
gtest_excludes = [ "*" ]
if (!is_cast_desktop_build) {
#Disable ToColorSpace/ColorTransformPixelTest* (b/64346790)
#Disable ImageBackgroundFilter* (b/64346875)
#Disable LayerTreeHostTilesTestPartialInvalidation* (b/65844132)
gtest_excludes += [
"ToColorSpace/ColorTransformPixelTest.*",
"ImageBackgroundFilter.*",
"LayerTreeHostTilesTestPartialInvalidation.*",
]
}
}
filters += [ cc_unittests_filter ]
content_unittests_filter = {
test_name = "content_unittests"
# IsSupportedVideoConfig_VP9TransferFunctions fails on all cast builds since
# the cast IsSupporedVideoConfigs ignore the transfer function parameter.
# (b/36984215).
gtest_excludes = [ "*.IsSupportedVideoConfig_VP9TransferFunctions" ]
if (target_os == "linux" && !is_cast_desktop_build) {
# DesktopCaptureDeviceTest.*: No capture device on Eureka
# Disable PepperGamepadHostTest.WaitForReply (pepper not supported on Eureka)
# Disable RenderWidgetHostTest.Background because we disable the
# blacklist to enable WebGL (b/16142554)
gtest_excludes += [
"DOMStorageDatabaseTest.TestCanOpenAndReadWebCoreDatabase",
"DesktopCaptureDeviceTest.Capture",
"GamepadProviderTest.PollingAccess",
"PepperGamepadHostTest.WaitForReply",
"RenderWidgetHostTest.Background",
]
}
if (is_cast_audio_only) {
# No way to display URL's on audio only cast devices.
gtest_excludes += [ "NavigationEntryTest.NavigationEntryURLs" ]
}
if (enable_assistant && !is_cast_desktop_build) {
# Temporarily disable InvalidUUID and DefaultConstructor on assistant
# device builds. Cause of failure is unclear, but it's highly likely it's
# related to them being DEATH tests. These were passing until the
# is_official_build flag was enabled. These tests are considered
# non-critical in this context. (b/62469368)
gtest_excludes += [
"BluetoothBlocklistTest.InvalidUUID",
"WebBluetoothDeviceIdTest.DefaultConstructor",
]
}
}
filters += [ content_unittests_filter ]
media_unittests_filter = {
test_name = "media_unittests"
if (target_os == "linux" && !is_cast_desktop_build) {
# Disable VP9 related tests (b/18593324)
# PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM
# PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM
# PipelineIntegrationTest.BasicPlayback_VP9*
# PipelineIntegrationTest.P444_VP9_WebM
# Disable VP8A tests (b/18593324)
# PipelineIntegrationTest.BasicPlayback_VP8A*
# Disable OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0 (unit
# test fails when Opus decoder uses fixed-point)
# Due to b/16456550, disable the following four test cases:
# AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose
# AudioOutputControllerTest.PlaySwitchDeviceClose
# AudioStreamHandlerTest.Play
# SoundsManagerTest.Play
# Disable AudioStreamHandlerTest.ConsecutivePlayRequests (b/16539293)
gtest_excludes = [
"AudioOutputControllerTest.PlayDivertSwitchDeviceRevertClose",
"AudioOutputControllerTest.PlaySwitchDeviceClose",
"AudioStreamHandlerTest.Play",
"AudioStreamHandlerTest.ConsecutivePlayRequests",
"PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM",
"PipelineIntegrationTest.BasicPlayback_VideoOnly_VP9_WebM",
"PipelineIntegrationTest.BasicPlayback_VP9*",
"PipelineIntegrationTest.P444_VP9_WebM",
"PipelineIntegrationTest.BasicPlayback_VP8A*",
"OpusAudioDecoderTest/AudioDecoderTest.ProduceAudioSamples/0",
"SoundsManagerTest.Play",
]
} else if (target_os == "android" || is_cast_desktop_build) {
# Disable PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM (not supported)
gtest_excludes =
[ "PipelineIntegrationTest.BasicPlayback_MediaSource_VP9_WebM" ]
}
}
filters += [ media_unittests_filter ]
net_unittests_filter = {
test_name = "net_unittests"
if (using_sanitizer) {
# TODO(mbjorge): net_unittests do not complete when run with sanitizers,
# (in particular, TSAN and UBSAN), resulting in build machines getting stuck
# for many hours. Disable them for now, since these are getting run on
# Chromium bots anyway. (internal b/31279943)
gtest_excludes = [ "*" ]
} else if (target_os == "linux" && !is_cast_desktop_build) {
# Run net_unittests first to avoid random failures due to slow python startup
# URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase
# timeout to 90s from 45s to allow it to pass (b/19821476)
# PacFileFetcherImplTest.HttpMimeType is flaking (b/19848784)
# Running a batch of net_unittests has high overhead. Run tests in batches of 50 to reduce number of batches (b/23156294).
gtest_excludes = [ "PacFileFetcherImplTest.HttpMimeType" ]
args = [
"--test-launcher-timeout=90000",
"--test-launcher-batch-limit=50",
]
} else if (is_cast_desktop_build || target_os == "android") {
# URLRequestTestHTTP.GetTest_ManyCookies takes roughly 55s to run. Increase
# timeout to 90s from 45s to allow it to pass (b/19821476) (b/29415636).
# CTLogVerifierTest.VerifiesValidConsistencyProofsFromReferenceGenerator
# times out occasionally, paricularly on the CQ bots; disable to reduce
# CQ flakiness (crbug/598406) (b/29415636).
# Running a batch of net_unittests has high overhead, so
# run tests in batches of 25 to reduce number of batches (b/23156294).
gtest_excludes = [ "CTLogVerifierTest.VerifiesValidConsistencyProofsFromReferenceGenerator" ]
args = [
"--test-launcher-timeout=90000",
"--test-launcher-batch-limit=25",
]
}
}
filters += [ net_unittests_filter ]
}
# Creates the build and run lists for all test targets.
cast_test_group_list("cast_test_lists") {
build_list_path = "$root_out_dir/tests/build_test_list.txt"
runtime_deps_path = "$root_out_dir/tests/runtime_deps.json"
run_list_path = "$root_out_dir/tests/run_test_list.txt"
additional_options = [
"--ozone-platform=headless --test-launcher-bot-mode $cast_test_extra_flags",
]
test_groups = [ ":cast_tests" ]
if (chromecast_branding != "public") {
test_groups += [ "//chromecast/internal:internal_cast_tests" ]
}
}
if (is_android) {
cast_test_group("cast_junit_tests") {
test_type = "junit"
tests = [
"//base:base_junit_tests",
"//chromecast/base:cast_base_junit_tests",
"//chromecast/browser/android:cast_shell_junit_tests",
"//content/public/android:content_junit_tests",
"//net/android:net_junit_tests",
"//testing/android/junit:junit_unit_tests",
"//ui/android:ui_junit_tests",
]
}
cast_test_group_list("cast_junit_test_lists") {
test_type = "junit"
build_list_path = "$root_out_dir/junit/build_junit_test_list.txt"
runtime_deps_path = "$root_out_dir/junit/runtime_deps.json"
run_list_path = "$root_out_dir/junit/run_junit_test_list.txt"
test_groups = [ ":cast_junit_tests" ]
if (chromecast_branding != "public") {
test_groups += [ "//chromecast/internal:internal_cast_junit_tests" ]
}
}
}
test("cast_shell_unittests") {
deps = [
":cast_shell_lib",
"//chromecast/app:test_support",
"//chromecast/app:unittests",
"//chromecast/browser:unittests",
"//ui/gl:test_support",
]
}
test("cast_shell_browsertests") {
deps = [
":cast_shell_lib",
"//chromecast/app:test_support",
"//chromecast/browser:browsertests",
]
data_deps = [
":chromecast_locales_pak",
]
}
group("cast_shell_lib") {
data_deps = [
":cast_shell_pak",
]
deps = [
"//chromecast/app",
"//chromecast/browser",
"//chromecast/common",
"//chromecast/renderer",
]
if (chromecast_branding != "public") {
deps += [ "//chromecast/internal/shell" ]
}
}
cast_executable("cast_shell") {
sources = [
"app/cast_main.cc",
]
deps = [
":cast_shell_lib",
":chromecast_locales_pak",
"//chromecast/app",
"//content/public/app:both",
]
}
if (is_fuchsia) {
fuchsia_package("cast_shell_pkg") {
binary = ":cast_shell"
package_name_override = "cast_shell"
sandbox_policy = "//build/config/fuchsia/testing_sandbox_policy"
if (chromecast_branding != "public") {
deps = [
"//chromecast/internal:fuchsia_internal_data_deps",
]
}
}
fuchsia_package_runner("cast_shell_fuchsia") {
package = ":cast_shell_pkg"
package_name_override = "cast_shell"
}
}
repack("cast_shell_pak") {
sources = [
"$root_gen_dir/chromecast/app/shell_resources.pak",
"$root_gen_dir/chromecast/browser/cast_browser_resources.pak",
"$root_gen_dir/content/app/resources/content_resources_100_percent.pak",
"$root_gen_dir/content/app/strings/content_strings_en-US.pak",
"$root_gen_dir/content/content_resources.pak",
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/net/net_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_100_percent.pak",
"$root_gen_dir/ui/resources/ui_resources_100_percent.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
"$root_gen_dir/ui/strings/app_locale_settings_en-US.pak",
"$root_gen_dir/ui/strings/ui_strings_en-US.pak",
]
output = "$root_out_dir/assets/cast_shell.pak"
deps = [
"//chromecast/app:resources",
"//chromecast/browser:resources",
"//content:resources",
"//content/app/resources",
"//content/app/strings",
"//mojo/public/js:resources",
"//net:net_resources",
"//third_party/blink/public:resources",
"//third_party/blink/public:scaled_resources_100_percent",
"//ui/resources",
"//ui/strings",
]
if (enable_chromecast_extensions) {
sources += [
"$root_gen_dir/chromecast/renderer/extensions_renderer_resources.pak",
"$root_gen_dir/extensions/extensions_renderer_resources.pak",
"$root_gen_dir/extensions/extensions_resources.pak",
"$root_gen_dir/extensions/shell/app_shell_resources.pak",
]
deps += [
"//chromecast/renderer:extensions_resources",
"//extensions:extensions_resources",
"//extensions/shell:resources",
]
}
if (chromecast_branding != "public") {
sources += [ "$root_gen_dir/chromecast/internal/cast_shell_internal.pak" ]
deps += [ "//chromecast/internal:cast_shell_internal_pak" ]
}
}
# Intermediate targets that repack grit resources by locale. For each locale
# in |cast_locales| (see //chromecast/chromecast.gni), all resources
# are packed into a single .pak file in an output directory. These targets
# should not be depended on directly; depend on ":chromecast_locales_pak"
# instead.
foreach(locale, cast_locales) {
repack("_cast_repack_${locale}") {
visibility = [ ":chromecast_locales_pak" ]
output = "$root_out_dir/chromecast_locales/${locale}.pak"
sources = [
"$root_gen_dir/chromecast/app/chromecast_settings_${locale}.pak",
]
deps = [
"//chromecast/app:chromecast_settings",
]
if (chromecast_branding != "public") {
sources += [
"$root_gen_dir/chromecast/internal/webui/app_strings_${locale}.pak",
]
deps += [ "//chromecast/internal/webui:chromecast_app_strings" ]
if (enable_chromecast_webui) {
sources += [ "$root_gen_dir/chromecast/internal/webui/webui_localized_${locale}.pak" ]
deps += [ "//chromecast/internal/webui:chromecast_webui_localized" ]
}
}
}
}
# A meta-target which repacks resources by locale.
group("chromecast_locales_pak") {
deps = []
foreach(locale, cast_locales) {
deps += [ ":_cast_repack_${locale}" ]
}
}
buildflag_header("chromecast_buildflags") {
header = "chromecast_buildflags.h"
flags = [
"DEFAULT_COMMAND_LINE_FLAGS=\"$default_command_line_flags\"",
"DISABLE_SECURE_FLAC_OPUS_DECODING=$disable_secure_flac_and_opus_decoding",
"ENABLE_ASSISTANT=$enable_assistant",
"ENABLE_CAST_FRAGMENT=$enable_cast_fragment",
"ENABLE_CHROMECAST_EXTENSIONS=$enable_chromecast_extensions",
"ENABLE_HEADLESS_MUSIC_MODE=$enable_headless_music_mode",
"ENABLE_PLAYREADY=$enable_playready",
"ENABLE_VOLUME_TABLES_ACCESS=$enable_volume_tables_access",
"IS_ANDROID_THINGS=$is_android_things",
"IS_ANDROID_THINGS_NON_PUBLIC=$is_android_things_non_public",
"IS_CAST_AUDIO_ONLY=$is_cast_audio_only",
"IS_CAST_DESKTOP_BUILD=$is_cast_desktop_build",
"IS_CAST_USING_CMA_BACKEND=$is_cast_using_cma_backend",
"IS_SINGLE_VOLUME=$is_single_volume",
"SUPPORTS_MULTIZONE=$supports_multizone",
"USE_ANDROID_USER_AGENT=$use_android_user_agent",
"USE_CHROMECAST_CDMS=$use_chromecast_cdms",
]
}
if (is_android) {
generate_jni_registration("cast_shell_jni_registration") {
target = ":cast_shell_apk"
output = "$root_gen_dir/chromecast/android/${target_name}.h"
exception_files = jni_exception_files
}
android_assets("cast_shell_apk_assets") {
assert(v8_use_external_startup_data)
sources = [
"$root_out_dir/assets/cast_shell.pak",
]
deps = [
":cast_shell_apk_locale_assets",
":cast_shell_pak",
"//third_party/icu:icu_assets",
"//v8:v8_external_startup_data_assets",
]
disable_compression = true
}
android_assets("cast_shell_apk_locale_assets") {
renaming_sources = []
renaming_destinations = []
foreach(locale, cast_locales) {
renaming_sources += [ "$root_out_dir/chromecast_locales/${locale}.pak" ]
renaming_destinations += [ "stored-locales/${locale}.pak" ]
}
deps = [
":chromecast_locales_pak",
]
treat_as_locale_paks = true
disable_compression = true
}
android_apk("cast_shell_apk") {
apk_name = "CastShell"
android_manifest = "$root_gen_dir/cast_shell_manifest/AndroidManifest.xml"
android_manifest_dep = "//chromecast/browser/android:cast_shell_manifest"
shared_libraries = [ "//chromecast/android:libcast_shell_android" ]
deps = [
":cast_shell_apk_assets",
"//base:base_java",
"//chromecast/android:libcast_shell_android",
"//chromecast/browser/android:cast_shell_java",
]
command_line_flags_file = "castshell-command-line"
}
}