forked from brave/muon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
common.gypi
6202 lines (5849 loc) · 238 KB
/
common.gypi
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
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (c) 2012 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.
# IMPORTANT:
# Please don't directly include this file if you are building via gyp_chromium,
# since gyp_chromium is automatically forcing its inclusion.
{
# Variables expected to be overriden on the GYP command line (-D) or by
# ~/.gyp/include.gypi.
'variables': {
# Putting a variables dict inside another variables dict looks kind of
# weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary
# to get these variables defined for the conditions within this variables
# dict that operate on these variables.
'variables': {
'variables': {
'variables': {
'variables': {
# Whether we're building a ChromeOS build.
'chromeos%': 0,
# Whether we're building the cast (chromecast) shell
'chromecast%': 0,
# Whether or not we are using the Aura windowing framework.
'use_aura%': 0,
# Whether or not we are building the Ash shell.
'use_ash%': 0,
# Whether or not we are using CRAS, the ChromeOS Audio Server.
'use_cras%': 0,
# Use a raw surface abstraction.
'use_ozone%': 0,
# Configure the build for small devices. See crbug.com/318413
'embedded%': 0,
'conditions': [
# Compute the architecture that we're building on.
['OS=="win" or OS=="ios"', {
'host_arch%': 'ia32',
}, {
'host_arch%': '<!pymod_do_main(detect_host_arch)',
}],
],
},
# Copy conditionally-set variables out one scope.
'chromeos%': '<(chromeos)',
'chromecast%': '<(chromecast)',
'use_aura%': '<(use_aura)',
'use_ash%': '<(use_ash)',
'use_cras%': '<(use_cras)',
'use_ozone%': '<(use_ozone)',
'embedded%': '<(embedded)',
'host_arch%': '<(host_arch)',
# Whether we are using Views Toolkit
'toolkit_views%': 0,
# Use the PCI lib to collect GPU information.
'use_libpci%': 1,
# Use OpenSSL for representing certificates. When targeting Android,
# the platform certificate library is used for certificate
# verification. On other targets, this flag also enables OpenSSL for
# certificate verification, but this configuration is unsupported.
'use_openssl_certs%': 0,
# Whether or not we use external popup menu.
'use_external_popup_menu%': 0,
# Disable viewport meta tag by default.
'enable_viewport%': 0,
# Enable HiDPI support.
'enable_hidpi%': 0,
# Enable Wayland display server support.
'enable_wayland_server%' : 0,
# Enable Wi-Fi Display support.
# WARNING: This enables MPEG Transport Stream (MPEG-TS) encoding!
'enable_wifi_display%' : 0,
# By default we build against a stable sysroot image to avoid
# depending on the packages installed on the local machine. Set this
# to 0 to build against locally installed headers and libraries (e.g.
# if packaging for a linux distro)
'use_sysroot%': 1,
# Override buildtype to select the desired build flavor.
# Dev - everyday build for development/testing
# Official - release build (generally implies additional processing)
# TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
# conversion is done), some of the things which are now controlled by
# 'branding', such as symbol generation, will need to be refactored
# based on 'buildtype' (i.e. we don't care about saving symbols for
# non-Official # builds).
'buildtype%': 'Dev',
# Override branding to select the desired branding flavor.
'branding%': 'Chromium',
'conditions': [
# Windows and Linux use Aura, but not Ash.
['OS=="win" or OS=="linux" or OS=="openbsd" or OS=="freebsd"', {
'use_aura%': 1,
}],
# ChromeOS uses Ash.
['chromeos', {
'use_ash%': 1,
}],
['chromecast==1', {
'use_libpci': 0,
'conditions': [
['OS!="android"', {
'embedded%': 1,
'use_ozone%': 1,
}],
],
}],
# Ozone uses Aura.
['use_ozone==1', {
'use_aura%': 1,
}],
# Whether we're a traditional desktop unix.
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
'desktop_linux%': 1,
}, {
'desktop_linux%': 0,
}],
# Embedded implies ozone.
['embedded==1', {
'use_ozone%': 1,
}],
# Mac and Android use external popup menu.
['OS=="mac" or OS=="android"', {
'use_external_popup_menu%': 1,
}],
['OS=="android"', {
'target_arch%': 'arm',
}, {
# Default architecture we're building for is the architecture we're
# building on, and possibly sub-architecture (for iOS builds).
'target_arch%': '<(host_arch)',
}],
],
},
# Copy conditionally-set variables out one scope.
'chromeos%': '<(chromeos)',
'chromecast%': '<(chromecast)',
'desktop_linux%': '<(desktop_linux)',
'use_aura%': '<(use_aura)',
'use_ash%': '<(use_ash)',
'use_cras%': '<(use_cras)',
'use_ozone%': '<(use_ozone)',
'embedded%': '<(embedded)',
'use_libpci%': '<(use_libpci)',
'use_openssl_certs%': '<(use_openssl_certs)',
'use_external_popup_menu%': '<(use_external_popup_menu)',
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
'enable_wayland_server%': '<(enable_wayland_server)',
'enable_wifi_display%': '<(enable_wifi_display)',
'buildtype%': '<(buildtype)',
'branding%': '<(branding)',
'branding_path_component%': '<(branding)',
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
'use_sysroot%': '<(use_sysroot)',
# Set to true to instrument the code with function call logger.
# See src/third_party/cygprofile/cyg-profile.cc for details.
'order_profiling%': 0,
'target_subarch%': '',
# The channel to build on Android: stable, beta, dev, canary, or
# default. "default" should be used on non-official builds.
'android_channel%': 'default',
# Set ARM architecture version.
'arm_version%': 7,
# Use aurax11 for clipboard implementation. This is true on linux_aura.
'use_clipboard_aurax11%': 0,
# goma settings.
# 1 to use goma.
# If no gomadir is set, it uses the default gomadir.
'use_goma%': 0,
'gomadir%': '',
'chroot_cmd%': '',
# The system libdir used for this ABI.
'system_libdir%': 'lib',
# Default MIPS arch variant. This is set in the conditions block
# below for MIPS targets.
'mips_arch_variant%': '',
# MIPS DSP ASE revision. Possible values are:
# 0: unavailable
# 1: revision 1
# 2: revision 2
'mips_dsp_rev%': 0,
# MIPS SIMD Arch compilation flag.
'mips_msa%': 1,
'conditions': [
['branding == "Chrome"', {
'branding_path_component%': 'google_chrome',
}],
['branding == "Chromium"', {
'branding_path_component%': 'chromium',
}],
# Ash needs Aura.
['use_aura==0', {
'use_ash%': 0,
}],
# Set default value of toolkit_views based on OS.
['OS=="mac" or OS=="win" or chromeos==1 or use_aura==1', {
'toolkit_views%': 1,
}, {
'toolkit_views%': 0,
}],
# Embedded builds use aura without ash or views.
['embedded==1', {
'use_aura%': 1,
'use_ash%': 0,
'toolkit_views%': 0,
}],
# Chromecast builds on x86 Linux should default to desktop builds.
['chromecast==1 and OS=="linux" and (target_arch=="ia32" or target_arch=="x64")', {
'is_cast_desktop_build%': 1,
}, {
'is_cast_desktop_build%': 0,
}],
# Enable HiDPI on Mac OS, Windows and Linux (including Chrome OS).
['OS=="mac" or OS=="win" or OS=="linux" or OS=="openbsd" or OS=="freebsd"', {
'enable_hidpi%': 1,
}],
# Enable App Launcher on ChromeOS only.
['chromeos==1', {
'enable_app_list%': 1,
}, {
'enable_app_list%': 0,
}],
['use_aura==1 and OS!="android"', {
'use_default_render_theme%': 1,
}, {
'use_default_render_theme%': 0,
}],
['use_ozone==1', {
'use_ozone_evdev%': 1,
}, {
'use_ozone_evdev%': 0,
}],
# Set default gomadir.
['OS=="win"', {
'gomadir': 'c:\\goma\\goma-win64',
}, {
'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
}],
# Set the default "target_subarch" on iOS. Valid values are "arm32",
# "arm64" and "both" (meaning a fat binary).
['OS=="ios"', {
'target_subarch%': 'arm64',
}],
# Set arch variants for MIPS platforms.
['target_arch=="mips64el"', {
'conditions': [
['OS=="android"', {
'mips_arch_variant%': 'r6',
}, {
'mips_arch_variant%': 'r2',
}],
],
}],
['target_arch=="mipsel"', {
'mips_arch_variant%': 'r1',
}],
# The system root for linux builds.
['OS=="linux" and chromeos==0 and use_sysroot==1', {
# sysroot needs to be an absolute path otherwise it generates
# incorrect results when passed to pkg-config
'conditions': [
['target_arch=="arm"', {
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_arm-sysroot',
}],
['target_arch=="arm64"', {
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_arm64-sysroot',
}],
['target_arch=="x64"', {
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_amd64-sysroot',
}],
['target_arch=="ia32"', {
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_i386-sysroot',
}],
['target_arch=="mipsel"', {
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_sid_mips-sysroot',
}],
],
}, {
'sysroot%': ''
}], # OS=="linux" and use_sysroot==1
],
},
# Copy conditionally-set variables out one scope.
'chromeos%': '<(chromeos)',
'chromecast%': '<(chromecast)',
'is_cast_desktop_build%': '<(is_cast_desktop_build)',
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
'target_subarch%': '<(target_subarch)',
'mips_arch_variant%': '<(mips_arch_variant)',
'mips_dsp_rev%': '<(mips_dsp_rev)',
'mips_msa%': '<(mips_msa)',
'toolkit_views%': '<(toolkit_views)',
'desktop_linux%': '<(desktop_linux)',
'use_aura%': '<(use_aura)',
'use_ash%': '<(use_ash)',
'use_cras%': '<(use_cras)',
'use_libpci%': '<(use_libpci)',
'use_ozone%': '<(use_ozone)',
'use_ozone_evdev%': '<(use_ozone_evdev)',
'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
'embedded%': '<(embedded)',
'use_openssl_certs%': '<(use_openssl_certs)',
'use_external_popup_menu%': '<(use_external_popup_menu)',
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
'enable_wayland_server%': '<(enable_wayland_server)',
'enable_wifi_display%': '<(enable_wifi_display)',
'android_channel%': '<(android_channel)',
'use_goma%': '<(use_goma)',
'gomadir%': '<(gomadir)',
'enable_app_list%': '<(enable_app_list)',
'use_default_render_theme%': '<(use_default_render_theme)',
'buildtype%': '<(buildtype)',
'branding%': '<(branding)',
'branding_path_component%': '<(branding_path_component)',
'arm_version%': '<(arm_version)',
'sysroot%': '<(sysroot)',
'use_sysroot%': '<(use_sysroot)',
'chroot_cmd%': '<(chroot_cmd)',
'system_libdir%': '<(system_libdir)',
'order_profiling%': '<(order_profiling)',
# TODO(zforman): Remove as soon as no bots depend on this.
'dont_embed_build_metadata%': 0,
# Set to 1 to force Visual C++ to use legacy debug information format /Z7.
# This is useful for parallel compilation tools which can't support /Zi.
# Only used on Windows.
'win_z7%' : 0,
# Set to 1 to enable dcheck in Release build.
'dcheck_always_on%': 0,
# Set to 1 to make a build that disables unshipped tracing events.
# Note: this setting is ignored if buildtype=="Official".
'tracing_like_official_build%': 0,
# Set to 1 to make a build that disables activation of field trial tests
# specified in testing/variations/fieldtrial_testing_config_*.json.
# Note: this setting is ignored if branding=="Chrome".
'fieldtrial_testing_like_official_build%': 0,
# Disable image loader component extension by default.
'image_loader_extension%': 0,
# Set NEON compilation flags.
'arm_neon%': 1,
# Detect NEON support at run-time. TODO(pasko): This variable is no longer
# set to non-zero, remove it when the last official build with NEON
# runtime detection propagates to Stable channel.
'arm_neon_optional%': 0,
# Use libjpeg-turbo as the JPEG codec used by Chromium.
'use_libjpeg_turbo%': 1,
# Use system libjpeg. Note that the system's libjepg will be used even if
# use_libjpeg_turbo is set.
'use_system_libjpeg%': 0,
# By default, component is set to static_library and it can be overriden
# by the GYP command line or by ~/.gyp/include.gypi.
'component%': 'static_library',
# /analyze is off by default on Windows because it is very slow and noisy.
# Enable with GYP_DEFINES=win_analyze=1
'win_analyze%': 0,
# /debug:fastlink is off by default on Windows because it generates PDBs
# that are machine-local. But, great for local builds.
# Enable with GYP_DEFINES=win_fastlink=1
'win_fastlink%': 0,
# Experimental setting to optimize Chrome's DLLs with PGO.
'chrome_pgo_phase%': '0',
# Experimental setting to build the official builds with full WPO.
'full_wpo_on_official%': '0',
# Set to select the Title Case versions of strings in GRD files.
'use_titlecase_in_grd%': 0,
# Remoting compilation is enabled by default. Set to 0 to disable.
'remoting%': 1,
# Configuration policy is enabled by default. Overridden on some
# platforms. This can't be disabled manually since code in src/chrome
# assumes this is enabled.
'configuration_policy': 1,
# Variable safe_browsing is used to control the build time configuration
# for safe browsing feature. Safe browsing can be compiled in 3 different
# levels: 0 disables it, 1 enables it fully, and 2 enables mobile
# protection via an external API.
'safe_browsing%': 1,
# Web speech is enabled by default. Set to 0 to disable.
'enable_web_speech%': 1,
# 'Ok Google' hotwording is disabled by default. Set to 1 to enable. (This
# will download a closed-source NaCl module at startup.) Chrome-branded
# ChromeOS builds have this enabled by default.
'enable_hotwording%': 0,
# Notifications are compiled in by default. Set to 0 to disable.
'notifications%' : 1,
# Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
# regular builds and 1 for ASan builds.
'mac_want_real_dsym%': 'default',
# If this is set, the clang plugins used on the buildbot will be used.
# Run tools/clang/scripts/update.py to make sure they are compiled.
# This causes 'clang_chrome_plugins_flags' to be set.
# Has no effect if 'clang' is not set as well.
'clang_use_chrome_plugins%': 1,
# Enable building with ASAN (Clang's -fsanitize=address option).
# -fsanitize=address only works with clang, but asan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
'asan%': 0,
'asan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/asan/blacklist.txt',
# Enable coverage gathering instrumentation in sanitizer tools. This flag
# also controls coverage granularity.
'sanitizer_coverage%': '',
# Enable intra-object-overflow detection in ASan (experimental).
'asan_field_padding%': 0,
# Enable Chromium overrides of the default configurations for various
# dynamic tools (like ASan).
'use_sanitizer_options%': 0,
# Enable building with SyzyAsan.
# See https://github.com/google/syzygy/wiki/SyzyASanHowTo
'syzyasan%': 0,
# Enable building with LSan (Clang's -fsanitize=leak option).
# -fsanitize=leak only works with clang, but lsan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
'lsan%': 0,
# Enable building with TSan (Clang's -fsanitize=thread option).
# -fsanitize=thread only works with clang, but tsan=1 implies clang=1
# See http://clang.llvm.org/docs/ThreadSanitizer.html
'tsan%': 0,
'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt',
# Enable building with MSan (Clang's -fsanitize=memory option).
# MemorySanitizer only works with clang, but msan=1 implies clang=1
# See http://clang.llvm.org/docs/MemorySanitizer.html
'msan%': 0,
'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
# Track where uninitialized memory originates from. From fastest to
# slowest: 0 - no tracking, 1 - track only the initial allocation site, 2
# - track the chain of stores leading from allocation site to use site.
'msan_track_origins%': 2,
# Enable building with UBSan (Clang's -fsanitize=undefined option).
# -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
# See http://clang.llvm.org/docs/UsersManual.html
'ubsan%': 0,
'ubsan_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan/blacklist.txt',
'ubsan_security_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan/security_blacklist.txt',
'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan/vptr_blacklist.txt',
# Enable building with UBsan's vptr (Clang's -fsanitize=vptr option).
# -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1
# ubsan_security also enables UBSan's vptr.
'ubsan_security%': 0,
'ubsan_vptr%': 0,
# Use dynamic libraries instrumented by one of the sanitizers
# instead of the standard system libraries. Set this flag to build the
# libraries from source.
'use_instrumented_libraries%': 0,
# Use dynamic libraries instrumented by one of the sanitizers
# instead of the standard system libraries. Set this flag to download
# prebuilt binaries from GCS.
'use_prebuilt_instrumented_libraries%': 0,
# Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
# stdlibc++ as standard library. This is intended to use for instrumented
# builds.
'use_custom_libcxx%': 0,
'libcxx_prefix%': '../../buildtools/third_party/libc++/trunk',
'libcxxabi_prefix%': '../../buildtools/third_party/libc++abi/trunk',
# Use the provided profiled order file to link Chrome image with it.
# This makes Chrome faster by better using CPU cache when executing code.
# This is known as PGO (profile guided optimization).
# See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
'order_text_section%' : "",
# Set to 1 compile with -fPIC cflag on linux. This is a must for shared
# libraries on linux x86-64 and arm, plus ASLR.
'linux_fpic%': 1,
# Whether one-click signin is enabled or not.
'enable_one_click_signin%': 0,
# Enable Chrome browser extensions
'enable_extensions%': 1,
# Enable basic printing support and UI.
'enable_basic_printing%': 1,
# Enable printing with print preview. It does not imply
# enable_basic_printing. It's possible to build Chrome with preview only.
'enable_print_preview%': 1,
# Enable spell checker.
'enable_spellcheck%': 1,
# Use the operating system spellchecker, e.g. NSSpellChecker on Mac or
# SpellCheckerSession on Android.
'use_browser_spellchecker%': 0,
# Use Minikin hyphenation engine.
'use_minikin_hyphenation%': 0,
# Media router support is enabled by default. Set to 0 to disable.
'enable_media_router%': 1,
# Enables use of the session service, which is enabled by default.
# Support for disabling depends on the platform.
'enable_session_service%': 1,
# Enables theme support, which is enabled by default. Support for
# disabling depends on the platform.
'enable_themes%': 1,
# Enable the task manager by default.
'enable_task_manager%': 1,
# Enables used resource whitelist generation; disabled by default.
'enable_resource_whitelist_generation%': 0,
# Enable FILE support by default.
'disable_file_support%': 0,
# Do not use the platform ICU alternatives by default.
'use_platform_icu_alternatives%': 0,
# Do not disable brotli filter by default.
'disable_brotli_filter%': 0,
# Use of precompiled headers on Windows.
#
# This variable may be explicitly set to 1 (enabled) or 0
# (disabled) in ~/.gyp/include.gypi or via the GYP command line.
# This setting will override the default.
#
# See
# https://chromium.googlesource.com/chromium/src/+/master/docs/windows_precompiled_headers.md
# for details.
'chromium_win_pch%': 0,
# Clang stuff.
'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
# Set this to true when building with Clang.
# See https://chromium.googlesource.com/chromium/src/+/master/docs/clang.md for details.
# If this is set, clang is used as both host and target compiler in
# cross-compile builds.
'clang%': 0,
# Use experimental lld linker instead of the platform's default linker.
'use_lld%': 0,
# Enable plugin installation by default.
'enable_plugin_installation%': 1,
# Specifies whether to use canvas_skia.cc in place of platform
# specific implementations of gfx::Canvas. Affects text drawing in the
# Chrome UI.
# TODO(asvitkine): Enable this on all platforms and delete this flag.
# http://crbug.com/105550
'use_canvas_skia%': 0,
# Set to "drmemory" to configure the build to work with DrMemory.
'build_for_tool%': '',
'wix_path%': '<(DEPTH)/third_party/wix',
# Supervised users are enabled by default.
'enable_supervised_users%': 1,
'enable_mdns%' : 0,
'enable_service_discovery%': 0,
'enable_hangout_services_extension%': 0,
# Enable the Syzygy optimization step.
'syzygy_optimize%': 0,
# Enable hole punching for the protected video.
'video_hole%': 0,
# Automatically select platforms under ozone. Turn this off to
# build only explicitly selected platforms.
'ozone_auto_platforms%': 1,
# Disable the display for a chromecast build. Set to 1 perform an audio-
# only build.
'disable_display%': 0,
# If this is set clang is used as host compiler, but not as target
# compiler. Always do this by default.
'host_clang%': 1,
# Variables to control Link-Time Optimization (LTO).
# On Android, when using GCC LTO, the variable use_lto enables LTO on code
# compiled with -Os, and use_lto_o2 enables LTO on code compiled with -O2.
# On other platforms (including Android with Clang), use_lto enables LTO
# in all translation units, and use_lto_o2 has no effect.
#
# On Linux and Android, when using LLVM LTO, the script
# build/download_gold_plugin.py must be run to download a linker plugin.
# On Mac, LLVM needs to be built from scratch using
# tools/clang/scripts/update.py and the absolute path to
# third_party/llvm-build/Release+Asserts/lib must be added to
# $DYLD_LIBRARY_PATH to pick up the right version of the linker plugin.
# TODO(pcc): Teach build system to use -lto_library flag to specify path
# to linker plugin on Mac.
#
# On Android/GCC, the variables must *not* be enabled at the same time.
# In this case LTO would 'merge' the optimization flags at link-time
# which would lead to all code be optimized with -O2. See crbug.com/407544
'use_lto%': 0,
'use_lto_o2%': 0,
# Allowed level of identical code folding in the gold linker.
'gold_icf_level%': 'all',
# Libxkbcommon usage.
'use_xkbcommon%': 0,
# Whether we use GTKv3 on linux.
'use_gtk3%': 0,
# Control Flow Integrity for virtual calls and casts.
# See http://clang.llvm.org/docs/ControlFlowIntegrity.html
'cfi_vptr%': 0,
# TODO(krasin): remove it. See https://crbug.com/626794.
'cfi_cast%': 0,
'cfi_diag%': 0,
'cfi_blacklist%': '<(PRODUCT_DIR)/../../tools/cfi/blacklist.txt',
# Whether the entire browser uses toolkit-views on Mac instead of Cocoa.
'mac_views_browser%': 0,
# By default, use ICU data file (icudtl.dat).
'icu_use_data_file_flag%': 1,
# Turn on JNI generation optimizations by default.
'optimize_jni_generation%': 1,
'conditions': [
# A flag for POSIX platforms
['OS=="win"', {
'os_posix%': 0,
}, {
'os_posix%': 1,
}],
# A flag for BSD platforms
['OS=="freebsd" or OS=="openbsd"', {
'os_bsd%': 1,
}, {
'os_bsd%': 0,
}],
# NSS usage.
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris")', {
'use_nss_certs%': 1,
}, {
'use_nss_certs%': 0,
}],
# libudev usage. This currently only affects the content layer.
['OS=="linux" and embedded==0', {
'use_udev%': 1,
}, {
'use_udev%': 0,
}],
# Flags to use X11 on non-Mac POSIX platforms.
['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
'use_x11%': 0,
}, {
'use_x11%': 1,
}],
# Flags to use glib.
['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
'use_glib%': 0,
}, {
'use_glib%': 1,
}],
# Flags to use Wayland server support.
['chromeos==1', {
'enable_wayland_server%': 1,
}, {
'enable_wayland_server%': 0,
}],
# Flags to use pango and cairo.
['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
'use_pango%': 0,
'use_cairo%': 0,
}, {
'use_pango%': 1,
'use_cairo%': 1,
}],
# DBus usage.
['(OS=="linux" or OS=="openbsd" or OS=="freebsd") and embedded==0', {
'use_dbus%': 1,
}, {
'use_dbus%': 0,
}],
# We always use skia text rendering in Aura on Windows, since GDI
# doesn't agree with our BackingStore.
# TODO(beng): remove once skia text rendering is on by default.
['use_aura==1 and OS=="win"', {
'enable_skia_text%': 1,
}],
# A flag to enable or disable our compile-time dependency
# on gnome-keyring. If that dependency is disabled, no gnome-keyring
# support will be available. This option is useful
# for Linux distributions and for Aura.
['OS!="linux" or chromeos==1', {
'use_gnome_keyring%': 0,
}, {
'use_gnome_keyring%': 1,
}],
['OS=="mac" or OS=="ios"', {
# Mac and iOS want Title Case strings
'use_titlecase_in_grd%': 1,
}],
# Enable loader extensions on Chrome OS.
['chromeos==1', {
'image_loader_extension%': 1,
}, {
'image_loader_extension%': 0,
}],
['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
'enable_one_click_signin%': 1,
}],
['OS=="android"', {
'enable_extensions%': 0,
'enable_themes%': 0,
'remoting%': 0,
'enable_basic_printing%': 1,
'enable_print_preview%': 0,
'enable_task_manager%':0,
'video_hole%': 1,
}],
# Android and OSX have built-in spellcheckers that can be utilized.
['OS=="android" or OS=="mac"', {
'use_browser_spellchecker%': 1,
}],
# Android has hyphenation dictionaries for Minikin to use.
['OS=="android"', {
'use_minikin_hyphenation%': 1,
}],
# Enables proprietary codecs and demuxers; e.g. H264, AAC, MP3, and MP4.
# We always build Google Chrome and Chromecast with proprietary codecs.
['branding=="Chrome" or chromecast==1', {
'proprietary_codecs%': 1,
}, {
'proprietary_codecs%': 0,
}],
# Enable Link Time Optimization for the official Linux Chrome.
# This requires LLVM Gold plugin to be downloaded.
# See src/tools/clang/scripts/update.py
['OS=="linux" and target_arch=="x64" and buildtype=="Official" and branding=="Chrome" and chromeos==0', {
'use_lto%': 1,
}],
# Enable hotwording on Chrome-branded ChromeOS builds.
['branding=="Chrome" and chromeos==1', {
'enable_hotwording%': 1,
}],
['OS=="ios"', {
'configuration_policy': 0,
'enable_extensions%': 0,
'enable_basic_printing%': 0,
'enable_print_preview%': 0,
'enable_session_service%': 0,
'enable_spellcheck%': 0,
'enable_themes%': 0,
'notifications%': 0,
'remoting%': 0,
'safe_browsing%': 2,
'enable_supervised_users%': 0,
'enable_task_manager%': 0,
'enable_media_router%': 0,
}],
# Use GPU accelerated cross process image transport by default
# on linux and *BSD builds with the Aura window manager
['use_aura==1 and (OS=="linux" or OS=="openbsd" or OS=="freebsd")', {
'ui_compositor_image_transport%': 1,
}, {
'ui_compositor_image_transport%': 0,
}],
# Turn precompiled headers on by default.
['OS=="win" and buildtype!="Official"', {
'chromium_win_pch%': 1
}],
# Whether PDF plugin is enabled, and which options it supports.
['OS=="android" or OS=="ios" or (embedded==1 and chromecast==0)', {
'enable_pdf%': 0,
'pdf_enable_v8%': 0,
}, {
'enable_pdf%': 1,
'pdf_enable_v8%': 1,
}],
['OS=="android" or OS=="ios" or (embedded==1 and chromecast==0)', {
'pdf_enable_xfa%': 0,
}, {
'pdf_enable_xfa%': 0,
}],
['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', {
'enable_plugin_installation%': 0,
}, {
'enable_plugin_installation%': 1,
}],
# Whether PPAPI is enabled.
['OS=="android" or OS=="ios" or (embedded==1 and chromecast==0)', {
'enable_plugins%': 0,
}, {
'enable_plugins%': 1,
}],
# linux_use_bundled_gold: whether to use the gold linker binary checked
# into third_party/binutils. Force this off via GYP_DEFINES when you
# are using a custom toolchain and need to control -B in ldflags.
# Do not use 32-bit gold on 32-bit hosts as it runs out address space
# for component=static_library builds.
['((OS=="linux" or OS=="android") and (target_arch=="x64" or target_arch=="arm" or (target_arch=="ia32" and host_arch=="x64"))) or (OS=="linux" and target_arch=="mipsel")', {
'linux_use_bundled_gold%': 1,
}, {
'linux_use_bundled_gold%': 0,
}],
# linux_use_bundled_binutils: whether to use the binary binutils
# checked into third_party/binutils. These are not multi-arch so cannot
# be used except on x86 and x86-64 (the only two architectures which
# are currently checke in). Force this off via GYP_DEFINES when you
# are using a custom toolchain and need to control -B in cflags.
['OS=="linux" and (target_arch=="x64")', {
'linux_use_bundled_binutils%': 1,
}, {
'linux_use_bundled_binutils%': 0,
}],
# linux_use_gold_flags: whether to use build flags that rely on gold.
# On by default for x64 Linux.
['OS=="linux" and target_arch=="x64"', {
'linux_use_gold_flags%': 1,
}, {
'linux_use_gold_flags%': 0,
}],
# linux_use_debug_fission: whether to use split DWARF debug info
# files. This can reduce link time significantly, but is incompatible
# with some utilities such as icecc and ccache. Requires gold and
# gcc >= 4.8 or clang.
# http://gcc.gnu.org/wiki/DebugFission
['OS=="linux" and target_arch=="x64"', {
'linux_use_debug_fission%': 1,
}, {
'linux_use_debug_fission%': 0,
}],
['OS=="android" or OS=="ios"', {
'enable_captive_portal_detection%': 0,
}, {
'enable_captive_portal_detection%': 1,
}],
# Enable Skia UI text drawing incrementally on different platforms.
# http://crbug.com/105550
#
# On Aura, this allows per-tile painting to be used in the browser
# compositor.
['OS!="android" and OS!="ios"', {
'use_canvas_skia%': 1,
}],
['chromeos==1', {
'enable_basic_printing%': 1,
'enable_print_preview%': 1,
}],
# Whether tests targets should be run, archived or just have the
# dependencies verified. All the tests targets have the '_run' suffix,
# e.g. base_unittests_run runs the target base_unittests. The test
# target always calls tools/swarming_client/isolate.py. See the script's
# --help for more information. Meant to be overriden with GYP_DEFINES.
# TODO(maruel): Remove the conditions as more configurations are
# supported.
['OS!="ios" and OS!="android" and chromeos==0 and OS!="openbsd" and OS!="freebsd"', {
'test_isolation_mode%': 'check',
}, {
'test_isolation_mode%': 'noop',
}],
# Whether Android build uses OpenMAX DL FFT.
['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32" or target_arch=="x64" or target_arch=="arm64" or target_arch=="mipsel")', {
# Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel.
# When enabled, this will also enable WebAudio support on
# Android for these architectures. Default is enabled. Whether
# WebAudio is actually available depends on runtime settings
# and flags.
'use_openmax_dl_fft%': 1,
}, {
'use_openmax_dl_fft%': 0,
}],
['OS=="win" or OS=="linux" or OS=="openbsd" or OS=="freebsd"', {
'enable_mdns%' : 1,
}],
# Disable various features by default on embedded.
['embedded==1', {
'remoting%': 0,
'enable_basic_printing%': 0,
'enable_print_preview%': 0,