brettw | 2bafab4 | 2014-11-27 18:36:17 | [diff] [blame] | 1 | # 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.org | 96ea63d | 2013-07-30 10:17:07 | [diff] [blame] | 4 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 5 | import("//build/dotfile_settings.gni") |
Jamie Madill | 7ec071b | 2018-02-06 20:16:38 | [diff] [blame] | 6 | import("//third_party/angle/dotfile_settings.gni") |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 7 | |
bauerb@chromium.org | 96ea63d | 2013-07-30 10:17:07 | [diff] [blame] | 8 | # The location of the build configuration file. |
| 9 | buildconfig = "//build/config/BUILDCONFIG.gn" |
| 10 | |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 11 | # These arguments override the default values for items in a declare_args |
| 12 | # block. "gn args" in turn can override these. |
| 13 | # |
| 14 | # In general the value for a build arg in the declare_args block should be the |
| 15 | # default. In some cases, a DEPS-ed in project will want different defaults for |
| 16 | # being built as part of Chrome vs. being built standalone. In this case, the |
| 17 | # Chrome defaults should go here. There should be no overrides here for |
| 18 | # values declared in the main Chrome repository. |
brettw | d8a46d9 | 2017-02-08 06:03:45 | [diff] [blame] | 19 | # |
| 20 | # Important note for defining defaults: This file is executed before the |
| 21 | # BUILDCONFIG.gn file. That file sets up the global variables like "is_ios". |
| 22 | # This means that the default_args can not depend on the platform, |
| 23 | # architecture, or other build parameters. If you really need that, the other |
| 24 | # repo should define a flag that toggles on a behavior that implements the |
| 25 | # additional logic required by Chrome to set the variables. |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 26 | default_args = { |
Sylvain Defresne | 99414551 | 2017-06-06 11:27:02 | [diff] [blame] | 27 | # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints |
| 28 | # a warning that "Build argument has no effect". When adding a v8 variable, it |
| 29 | # also needs to be defined to src/ios/BUILD.gn (respectively removed from both |
| 30 | # location when it is removed). |
| 31 | |
Adam Rice | d91b1db | 2019-10-02 06:22:18 | [diff] [blame] | 32 | v8_extra_library_files = [] |
Adam Rice | bf8191d0 | 2018-04-02 11:34:28 | [diff] [blame] | 33 | v8_experimental_extra_library_files = [] |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 34 | v8_enable_gdbjit = false |
| 35 | v8_imminent_deprecation_warnings = false |
Jochen Eisinger | 8be7d37b | 2017-06-02 08:37:56 | [diff] [blame] | 36 | |
| 37 | # TODO(jochen): Remove this. http://crbug.com/v8/5830, |
| 38 | # http://crbug.com/728583. |
| 39 | v8_check_microtasks_scopes_consistency = false |
Niels Möller | 0a5db00 | 2017-10-17 13:22:16 | [diff] [blame] | 40 | |
| 41 | # Don't include webrtc's builtin task queue implementation. |
| 42 | rtc_link_task_queue_impl = false |
Karl Wiberg | f3b599b | 2017-11-05 21:35:00 | [diff] [blame] | 43 | |
| 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 Sesek | 9c29eaa | 2017-12-11 19:47:13 | [diff] [blame] | 48 | |
| 49 | # Changes some setup for the Crashpad build to set them to build against |
| 50 | # Chromium's zlib, base, etc. |
Scott Graham | ec25b51 | 2017-12-20 05:40:40 | [diff] [blame] | 51 | crashpad_dependencies = "chromium" |
Jamie Madill | 178f84e | 2020-12-18 00:47:58 | [diff] [blame] | 52 | |
| 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" |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 59 | } |
| 60 | |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 61 | # These are the targets to skip header checking by default. The files in targets |
| 62 | # matching these patterns (see "gn help label_pattern" for format) will not have |
brettw | 2bafab4 | 2014-11-27 18:36:17 | [diff] [blame] | 63 | # their includes checked for proper dependencies when you run either |
| 64 | # "gn check" or "gn gen --check". |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 65 | no_check_targets = [ |
| 66 | # //chrome/*, https://crbug.com/949535 |
yoshiki iguchi | 6ca084b | 2021-03-02 05:06:36 | [diff] [blame] | 67 | "//chrome/browser/media/router/discovery:*", # 4 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 68 | "//chrome/browser/safe_browsing/android:*", # 3 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 69 | "//chrome/browser/safety_check/android:*", # 3 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 70 | "//chrome/browser/storage_access_api:*", # 2 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 71 | "//chrome/browser/touch_to_fill/android:*", # 8 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 72 | "//chrome/test:*", # 2682 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 73 | "//extensions/browser/api/declarative_net_request:*", # 18 errors |
| 74 | "//extensions/browser/api/declarative_webrequest:*", # 29 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 75 | "//extensions/browser/api/web_request:*", # 37 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 76 | "//extensions/browser/api:*", # 7 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 77 | "//extensions/browser:*", # 20 errors |
| 78 | "//extensions:*", # 75 errors |
| 79 | "//headless:*", # 167 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 80 | "//native_client/src/trusted/service_runtime:*", # 2 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 81 | "//ppapi/cpp/private:*", # 1 error |
| 82 | "//ppapi/host:*", # 1 error |
| 83 | "//ppapi/native_client/src/untrusted/pnacl_irt_shim:*", # 197 errors |
| 84 | "//ppapi/proxy:*", # 31 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 85 | "//ppapi/thunk:*", # 1071 errors |
| 86 | "//ppapi:*", # 3 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 87 | "//remoting/codec:*", # 32 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 88 | "//remoting/host/file_transfer:*", # 43 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 89 | "//remoting/host/installer/mac:*", # 1 error |
| 90 | "//remoting/host/it2me:*", # 18 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 91 | "//remoting/host/mac:*", # 49 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 92 | "//remoting/host/security_key:*", # 68 errors |
| 93 | "//remoting/host/setup:*", # 9 errors |
Kunihiko Sakamoto | 05a54119 | 2021-02-08 06:34:44 | [diff] [blame] | 94 | "//remoting/host/win:*", # 43 errors |
Hiroki Nakagawa | 95f5c061 | 2021-03-09 05:27:29 | [diff] [blame] | 95 | "//remoting/host:*", # 164 errors |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 96 | "//remoting/ios/app/settings:*", # 6 errors |
| 97 | "//remoting/ios/app:*", # 9 errors |
| 98 | "//remoting/ios/audio:*", # 5 errors |
| 99 | "//remoting/ios/domain:*", # 2 errors |
| 100 | "//remoting/ios/facade:*", # 8 errors |
| 101 | "//remoting/ios/persistence:*", # 10 errors |
| 102 | "//remoting/ios/session:*", # 7 errors |
| 103 | "//remoting/ios:*", # 2 errors |
Muyao Xu | 798e6e2 | 2021-03-01 19:01:02 | [diff] [blame] | 104 | "//remoting/protocol:*", # 3 errors |
| 105 | "//remoting/test:*", # 2 error |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 106 | "//sandbox/win:*", # 7 errors |
Daniel Bratell | 5c1bccba | 2019-04-23 17:37:02 | [diff] [blame] | 107 | |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 108 | "//third_party/icu/*", |
| 109 | "//third_party/libvpx:*", # 164 errors |
| 110 | "//third_party/libwebp:*", # 80 errors, https://crbug.com/800762 |
Devlin Cronin | 8f5ee779 | 2018-08-21 18:32:34 | [diff] [blame] | 111 | |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 112 | # //v8/*, https://crbug.com/v8/7330 |
| 113 | "//v8/src/inspector:*", # 20 errors |
| 114 | "//v8/test/cctest:*", # 26 errors |
| 115 | "//v8/test/unittests:*", # 11 errors |
| 116 | "//v8/test/wasm-api-tests:*", # 13 errors |
| 117 | "//v8/third_party/inspector_protocol:*", # 2 errors |
| 118 | "//v8/tools/debug_helper:*", # 9 errors |
| 119 | "//v8/tools/v8windbg:*", # 2 errors |
| 120 | "//v8:*", # 1871 errors |
brettw | e75311d | 2015-02-17 23:56:46 | [diff] [blame] | 121 | ] |
brettw | ed99f7b | 2015-04-07 00:22:50 | [diff] [blame] | 122 | |
| 123 | # These are the list of GN files that run exec_script. This whitelist exists |
| 124 | # to force additional review for new uses of exec_script, which is strongly |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 125 | # discouraged. |
| 126 | # |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 127 | # PLEASE READ |
| 128 | # |
| 129 | # You should almost never need to add new exec_script calls. exec_script is |
| 130 | # slow, especially on Windows, and can cause confusing effects. Although |
| 131 | # individually each call isn't slow or necessarily very confusing, at the scale |
| 132 | # of our repo things get out of hand quickly. By strongly pushing back on all |
| 133 | # additions, we keep the build fast and clean. If you think you need to add a |
| 134 | # new call, please consider: |
| 135 | # |
Wei-Yin Chen (陳威尹) | fec2ace | 2018-08-10 23:31:24 | [diff] [blame] | 136 | # - Do not use a script to check for the existence of a file or directory to |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 137 | # enable a different mode. Instead, use GN build args to enable or disable |
| 138 | # functionality and set options. An example is checking for a file in the |
| 139 | # src-internal repo to see if the corresponding src-internal feature should |
| 140 | # be enabled. There are several things that can go wrong with this: |
| 141 | # |
| 142 | # - It's mysterious what causes some things to happen. Although in many cases |
| 143 | # such behavior can be conveniently automatic, GN optimizes for explicit |
| 144 | # and obvious behavior so people can more easily diagnose problems. |
| 145 | # |
| 146 | # - The user can't enable a mode for one build and not another. With GN build |
| 147 | # args, the user can choose the exact configuration of multiple builds |
| 148 | # using one checkout. But implicitly basing flags on the state of the |
| 149 | # checkout, this functionality is broken. |
| 150 | # |
| 151 | # - It's easy to get stale files. If for example the user edits the gclient |
| 152 | # to stop checking out src-internal (or any other optional thing), it's |
| 153 | # easy to end up with stale files still mysteriously triggering build |
| 154 | # conditions that are no longer appropriate (yes, this happens in real |
| 155 | # life). |
| 156 | # |
| 157 | # - Do not use a script to iterate files in a directory (glob): |
| 158 | # |
| 159 | # - This has the same "stale file" problem as the above discussion. Various |
| 160 | # operations can leave untracked files in the source tree which can cause |
| 161 | # surprising effects. |
| 162 | # |
| 163 | # - It becomes impossible to use "git grep" to find where a certain file is |
| 164 | # referenced. This operation is very common and people really do get |
| 165 | # confused when things aren't listed. |
| 166 | # |
| 167 | # - It's easy to screw up. One common case is a build-time script that packs |
| 168 | # up a directory. The author notices that the script isn't re-run when the |
| 169 | # directory is updated, so adds a glob so all the files are listed as |
| 170 | # inputs. This seems to work great... until a file is deleted. When a |
thakis | 3e861de | 2016-06-14 14:24:01 | [diff] [blame] | 171 | # file is deleted, all the inputs the glob lists will still be up to date |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 172 | # and no command-lines will have been changed. The action will not be |
| 173 | # re-run and the build will be broken. It is possible to get this correct |
| 174 | # using glob, and it's possible to mess it up without glob, but globs make |
| 175 | # this situation much easier to create. if the build always lists the |
| 176 | # files and passes them to a script, it will always be correct. |
dgn | 47095171 | 2015-04-07 10:37:47 | [diff] [blame] | 177 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 178 | exec_script_whitelist = |
Jamie Madill | 7ec071b | 2018-02-06 20:16:38 | [diff] [blame] | 179 | build_dotfile_settings.exec_script_whitelist + |
| 180 | angle_dotfile_settings.exec_script_whitelist + |
| 181 | [ |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 182 | # Whitelist entries for //build should go into |
| 183 | # //build/dotfile_settings.gni instead, so that they can be shared |
| 184 | # with other repos. The entries in this list should be only for files |
| 185 | # in the Chromium repo outside of //build. |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 186 | "//build_overrides/build.gni", |
dgn | 47095171 | 2015-04-07 10:37:47 | [diff] [blame] | 187 | |
Peter Kotwicz | f4f4cd6 | 2019-06-11 19:57:38 | [diff] [blame] | 188 | "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", |
| 189 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 190 | # TODO(dgn): Layer violation but breaks the build otherwise, see |
| 191 | # https://crbug.com/474506. |
| 192 | "//clank/java/BUILD.gn", |
| 193 | "//clank/native/BUILD.gn", |
brettw | 46134cb | 2016-09-02 23:53:18 | [diff] [blame] | 194 | |
Nico Weber | 097f64c | 2018-10-23 17:48:02 | [diff] [blame] | 195 | "//google_apis/BUILD.gn", |
| 196 | "//printing/BUILD.gn", |
| 197 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 198 | "//remoting/host/installer/linux/BUILD.gn", |
| 199 | "//remoting/remoting_version.gni", |
| 200 | "//remoting/host/installer/win/generate_clsids.gni", |
brettw | de7b265 | 2016-09-09 23:25:05 | [diff] [blame] | 201 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 202 | "//tools/grit/grit_rule.gni", |
Andrew Grieve | 11c825d7 | 2020-01-03 00:51:33 | [diff] [blame] | 203 | "//tools/gritsettings/BUILD.gn", |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 204 | ] |