[go: nahoru, domu]

blob: c89d504b288ba008cbbf5458559404e0188ac1d8 [file] [log] [blame]
brettw2bafab42014-11-27 18:36:171# This file is used by the GN meta build system to find the root of the source
2# tree and to set startup options. For documentation on the values set in this
3# file, run "gn help dotfile" at the command line.
bauerb@chromium.org96ea63d2013-07-30 10:17:074
dpranke1cfa5312016-11-22 03:07:475import("//build/dotfile_settings.gni")
Jamie Madill7ec071b2018-02-06 20:16:386import("//third_party/angle/dotfile_settings.gni")
dpranke1cfa5312016-11-22 03:07:477
bauerb@chromium.org96ea63d2013-07-30 10:17:078# The location of the build configuration file.
9buildconfig = "//build/config/BUILDCONFIG.gn"
10
Dirk Prankea2d3c362021-04-13 21:39:4211# The python interpreter to use by default. On Windows, this will look
12# for python3.exe and python3.bat.
13script_executable = "python3"
14
brettw04a0e482017-01-25 21:29:5915# These arguments override the default values for items in a declare_args
16# block. "gn args" in turn can override these.
17#
18# In general the value for a build arg in the declare_args block should be the
19# default. In some cases, a DEPS-ed in project will want different defaults for
20# being built as part of Chrome vs. being built standalone. In this case, the
21# Chrome defaults should go here. There should be no overrides here for
22# values declared in the main Chrome repository.
brettwd8a46d92017-02-08 06:03:4523#
24# Important note for defining defaults: This file is executed before the
25# BUILDCONFIG.gn file. That file sets up the global variables like "is_ios".
26# This means that the default_args can not depend on the platform,
27# architecture, or other build parameters. If you really need that, the other
28# repo should define a flag that toggles on a behavior that implements the
29# additional logic required by Chrome to set the variables.
brettw04a0e482017-01-25 21:29:5930default_args = {
Sylvain Defresne994145512017-06-06 11:27:0231 # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints
32 # a warning that "Build argument has no effect". When adding a v8 variable, it
33 # also needs to be defined to src/ios/BUILD.gn (respectively removed from both
34 # location when it is removed).
35
Adam Riced91b1db2019-10-02 06:22:1836 v8_extra_library_files = []
Adam Ricebf8191d02018-04-02 11:34:2837 v8_experimental_extra_library_files = []
brettw04a0e482017-01-25 21:29:5938 v8_enable_gdbjit = false
39 v8_imminent_deprecation_warnings = false
Jochen Eisinger8be7d37b2017-06-02 08:37:5640
Niels Möller0a5db002017-10-17 13:22:1641 # Don't include webrtc's builtin task queue implementation.
42 rtc_link_task_queue_impl = false
Karl Wibergf3b599b2017-11-05 21:35:0043
44 # Don't include the iLBC audio codec.
45 # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
46 # deps on codecs, we can remove this.
47 rtc_include_ilbc = false
Robert Sesek9c29eaa2017-12-11 19:47:1348
49 # Changes some setup for the Crashpad build to set them to build against
50 # Chromium's zlib, base, etc.
Scott Grahamec25b512017-12-20 05:40:4051 crashpad_dependencies = "chromium"
Jamie Madill178f84e2020-12-18 00:47:5852
53 # Override ANGLE's Vulkan dependencies.
54 angle_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src"
55 angle_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
56 angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src"
57 angle_vulkan_validation_layers_dir =
58 "//third_party/vulkan-deps/vulkan-validation-layers/src"
Alex Rudenko5e0e1bc2021-09-03 10:14:1759
60 devtools_visibility = [ "*" ]
brettw04a0e482017-01-25 21:29:5961}
62
Erik Staab8a1acf42020-07-08 19:16:4563# These are the targets to skip header checking by default. The files in targets
64# matching these patterns (see "gn help label_pattern" for format) will not have
brettw2bafab42014-11-27 18:36:1765# their includes checked for proper dependencies when you run either
66# "gn check" or "gn gen --check".
Erik Staab8a1acf42020-07-08 19:16:4567no_check_targets = [
Sumaid Syedde5e2d12021-07-07 23:27:4768 "//extensions:*", # 28 errors
Andrey Kosyakovd8c9f4e22021-07-22 19:17:2569 "//headless:*", # 107 errors
Daniel Bratell5c1bccba2019-04-23 17:37:0270
Sumaid Syeda5de90b82021-07-28 06:33:4271 "//third_party/libwebp:*", # 7 errors, https://crbug.com/800762
Devlin Cronin8f5ee7792018-08-21 18:32:3472
Dan Elphick54b4f7b2021-05-04 14:31:4073 # //v8, https://crbug.com/v8/7330
74 "//v8/src/inspector:inspector", # 20 errors
75 "//v8/test/cctest:cctest_sources", # 2 errors
76 "//v8:cppgc_base", # 1 error
77 "//v8:v8_internal_headers", # 11 errors
78 "//v8:v8_libplatform", # 2 errors
brettwe75311d2015-02-17 23:56:4679]
brettwed99f7b2015-04-07 00:22:5080
81# These are the list of GN files that run exec_script. This whitelist exists
82# to force additional review for new uses of exec_script, which is strongly
brettwd385ecf2016-04-19 22:53:2383# discouraged.
84#
brettwd385ecf2016-04-19 22:53:2385# PLEASE READ
86#
87# You should almost never need to add new exec_script calls. exec_script is
88# slow, especially on Windows, and can cause confusing effects. Although
89# individually each call isn't slow or necessarily very confusing, at the scale
90# of our repo things get out of hand quickly. By strongly pushing back on all
91# additions, we keep the build fast and clean. If you think you need to add a
92# new call, please consider:
93#
Wei-Yin Chen (陳威尹)fec2ace2018-08-10 23:31:2494# - Do not use a script to check for the existence of a file or directory to
brettwd385ecf2016-04-19 22:53:2395# enable a different mode. Instead, use GN build args to enable or disable
96# functionality and set options. An example is checking for a file in the
97# src-internal repo to see if the corresponding src-internal feature should
98# be enabled. There are several things that can go wrong with this:
99#
100# - It's mysterious what causes some things to happen. Although in many cases
101# such behavior can be conveniently automatic, GN optimizes for explicit
102# and obvious behavior so people can more easily diagnose problems.
103#
104# - The user can't enable a mode for one build and not another. With GN build
105# args, the user can choose the exact configuration of multiple builds
106# using one checkout. But implicitly basing flags on the state of the
107# checkout, this functionality is broken.
108#
109# - It's easy to get stale files. If for example the user edits the gclient
110# to stop checking out src-internal (or any other optional thing), it's
111# easy to end up with stale files still mysteriously triggering build
112# conditions that are no longer appropriate (yes, this happens in real
113# life).
114#
115# - Do not use a script to iterate files in a directory (glob):
116#
117# - This has the same "stale file" problem as the above discussion. Various
118# operations can leave untracked files in the source tree which can cause
119# surprising effects.
120#
121# - It becomes impossible to use "git grep" to find where a certain file is
122# referenced. This operation is very common and people really do get
123# confused when things aren't listed.
124#
125# - It's easy to screw up. One common case is a build-time script that packs
126# up a directory. The author notices that the script isn't re-run when the
127# directory is updated, so adds a glob so all the files are listed as
128# inputs. This seems to work great... until a file is deleted. When a
thakis3e861de2016-06-14 14:24:01129# file is deleted, all the inputs the glob lists will still be up to date
brettwd385ecf2016-04-19 22:53:23130# and no command-lines will have been changed. The action will not be
131# re-run and the build will be broken. It is possible to get this correct
132# using glob, and it's possible to mess it up without glob, but globs make
133# this situation much easier to create. if the build always lists the
134# files and passes them to a script, it will always be correct.
dgn470951712015-04-07 10:37:47135
dpranke1cfa5312016-11-22 03:07:47136exec_script_whitelist =
Jamie Madill7ec071b2018-02-06 20:16:38137 build_dotfile_settings.exec_script_whitelist +
138 angle_dotfile_settings.exec_script_whitelist +
139 [
dpranke1cfa5312016-11-22 03:07:47140 # Whitelist entries for //build should go into
141 # //build/dotfile_settings.gni instead, so that they can be shared
142 # with other repos. The entries in this list should be only for files
143 # in the Chromium repo outside of //build.
dpranke1cfa5312016-11-22 03:07:47144 "//build_overrides/build.gni",
dgn470951712015-04-07 10:37:47145
Peter Kotwiczf4f4cd62019-06-11 19:57:38146 "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
147
dpranke1cfa5312016-11-22 03:07:47148 # TODO(dgn): Layer violation but breaks the build otherwise, see
149 # https://crbug.com/474506.
150 "//clank/java/BUILD.gn",
151 "//clank/native/BUILD.gn",
brettw46134cb2016-09-02 23:53:18152
Nico Weber097f64c2018-10-23 17:48:02153 "//google_apis/BUILD.gn",
154 "//printing/BUILD.gn",
155
dpranke1cfa5312016-11-22 03:07:47156 "//remoting/host/installer/linux/BUILD.gn",
157 "//remoting/remoting_version.gni",
158 "//remoting/host/installer/win/generate_clsids.gni",
brettwde7b2652016-09-09 23:25:05159
dpranke1cfa5312016-11-22 03:07:47160 "//tools/grit/grit_rule.gni",
Andrew Grieve11c825d72020-01-03 00:51:33161 "//tools/gritsettings/BUILD.gn",
dpranke1cfa5312016-11-22 03:07:47162 ]