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") |
| 6 | |
bauerb@chromium.org | 96ea63d | 2013-07-30 10:17:07 | [diff] [blame] | 7 | # The location of the build configuration file. |
| 8 | buildconfig = "//build/config/BUILDCONFIG.gn" |
| 9 | |
| 10 | # The secondary source root is a parallel directory tree where |
scheib | ec4b3a4 | 2014-09-18 21:50:13 | [diff] [blame] | 11 | # GN build files are placed when they can not be placed directly |
| 12 | # in the source tree, e.g. for third party source trees. |
cmasone@chromium.org | 26688b86e | 2014-06-19 13:14:26 | [diff] [blame] | 13 | secondary_source = "//build/secondary/" |
brettw | 2bafab4 | 2014-11-27 18:36:17 | [diff] [blame] | 14 | |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 15 | # 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. |
brettw | d8a46d9 | 2017-02-08 06:03:45 | [diff] [blame] | 23 | # |
| 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. |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 30 | default_args = { |
Sylvain Defresne | 99414551 | 2017-06-06 11:27:02 | [diff] [blame] | 31 | # 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 | |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 36 | v8_extra_library_files = [ |
| 37 | # Dependencies used by the extra libraries. Putting them here causes them |
| 38 | # to be executed first during snapshot creation. |
Adam Rice | be92b2d | 2017-07-28 13:07:18 | [diff] [blame] | 39 | "//third_party/WebKit/Source/core/streams/CommonOperations.js", |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 40 | "//third_party/WebKit/Source/core/streams/CommonStrings.js", |
ricea | e123782 | 2017-03-21 06:26:29 | [diff] [blame] | 41 | "//third_party/WebKit/Source/core/streams/SimpleQueue.js", |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 42 | |
| 43 | # Extra libraries. |
| 44 | "//third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js", |
| 45 | "//third_party/WebKit/Source/core/streams/CountQueuingStrategy.js", |
| 46 | "//third_party/WebKit/Source/core/streams/ReadableStream.js", |
ricea | 9ba4a643 | 2017-01-26 17:11:57 | [diff] [blame] | 47 | "//third_party/WebKit/Source/core/streams/WritableStream.js", |
| 48 | ] |
Adam Rice | 9dc1afc | 2017-11-10 10:18:59 | [diff] [blame] | 49 | v8_experimental_extra_library_files = |
| 50 | [ "//third_party/WebKit/Source/core/streams/TransformStream.js" ] |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 51 | v8_enable_gdbjit = false |
| 52 | v8_imminent_deprecation_warnings = false |
Jochen Eisinger | 8be7d37b | 2017-06-02 08:37:56 | [diff] [blame] | 53 | |
| 54 | # TODO(jochen): Remove this. http://crbug.com/v8/5830, |
| 55 | # http://crbug.com/728583. |
| 56 | v8_check_microtasks_scopes_consistency = false |
Niels Möller | 0a5db00 | 2017-10-17 13:22:16 | [diff] [blame] | 57 | |
| 58 | # Don't include webrtc's builtin task queue implementation. |
| 59 | rtc_link_task_queue_impl = false |
Karl Wiberg | f3b599b | 2017-11-05 21:35:00 | [diff] [blame] | 60 | |
| 61 | # Don't include the iLBC audio codec. |
| 62 | # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal |
| 63 | # deps on codecs, we can remove this. |
| 64 | rtc_include_ilbc = false |
Robert Sesek | 9c29eaa | 2017-12-11 19:47:13 | [diff] [blame] | 65 | |
| 66 | # Changes some setup for the Crashpad build to set them to build against |
| 67 | # Chromium's zlib, base, etc. |
Scott Graham | ec25b51 | 2017-12-20 05:40:40 | [diff] [blame] | 68 | crashpad_dependencies = "chromium" |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 69 | } |
| 70 | |
brettw | 2bafab4 | 2014-11-27 18:36:17 | [diff] [blame] | 71 | # These are the targets to check headers for by default. The files in targets |
| 72 | # matching these patterns (see "gn help label_pattern" for format) will have |
| 73 | # their includes checked for proper dependencies when you run either |
| 74 | # "gn check" or "gn gen --check". |
brettw | e75311d | 2015-02-17 23:56:46 | [diff] [blame] | 75 | check_targets = [ |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 76 | #"//apps/*", # Medium-hard. |
msw | afbb0c0 | 2016-02-11 01:54:12 | [diff] [blame] | 77 | "//ash/*", |
brettw | 29c2f89 | 2015-11-27 17:03:49 | [diff] [blame] | 78 | "//base/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 79 | "//blink/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 80 | "//build/*", |
brettw | e75311d | 2015-02-17 23:56:46 | [diff] [blame] | 81 | "//cc/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 82 | |
| 83 | #"//chrome/*", # Epic number of errors. |
tfarina | 8e58488 | 2016-01-09 00:50:15 | [diff] [blame] | 84 | "//chrome/app/*", |
Michail Pishchagin | d44036c | 2017-08-18 20:01:22 | [diff] [blame] | 85 | "//chrome/app_shim/*", |
Benjamin Gordon | ae9c199 | 2017-06-19 16:24:23 | [diff] [blame] | 86 | "//chrome/browser/chromeos/*", |
brettw | afa8f54 | 2016-08-24 05:16:24 | [diff] [blame] | 87 | "//chrome/browser/extensions/*", |
brettw | b3e6014 | 2016-09-23 19:55:01 | [diff] [blame] | 88 | "//chrome/browser/ui/*", |
brettw | 0b9c96b1 | 2015-10-15 23:06:04 | [diff] [blame] | 89 | "//chrome/common/*", |
brettw | f986f95 | 2015-10-07 17:18:15 | [diff] [blame] | 90 | "//chrome/installer/*", |
Brett Wilson | 69cf473 | 2017-09-01 01:34:40 | [diff] [blame] | 91 | "//chrome/profiling", |
brettw | 0b9c96b1 | 2015-10-15 23:06:04 | [diff] [blame] | 92 | "//chrome/third_party/mozilla_security_manager/*", |
tfarina | 961ad5d | 2016-01-06 22:27:11 | [diff] [blame] | 93 | "//chrome/tools/*", |
tfarina | 02f77a4 | 2015-12-17 22:38:23 | [diff] [blame] | 94 | "//chrome/utility/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 95 | "//chromecast/*", |
oshima | 3f959fa8 | 2016-05-02 18:42:57 | [diff] [blame] | 96 | "//chromeos/*", |
brettw | a219e92 | 2015-12-07 22:23:39 | [diff] [blame] | 97 | "//chrome_elf/*", |
| 98 | "//cloud_print/*", |
brettw | b5440a9 | 2015-12-03 00:47:12 | [diff] [blame] | 99 | "//components/*", |
brettw | d064ace4e | 2016-07-21 21:38:53 | [diff] [blame] | 100 | "//content/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 101 | "//courgette/*", |
| 102 | "//crypto/*", |
| 103 | "//data/*", |
| 104 | "//dbus/*", |
brettw | bda835b | 2015-12-04 22:12:30 | [diff] [blame] | 105 | "//device/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 106 | |
| 107 | #"//extensions/*", # Lots of errors. |
brettw | dc1e618 | 2016-08-30 20:52:13 | [diff] [blame] | 108 | "//extensions:extensions_unittests", |
| 109 | "//extensions/browser:browser_tests", |
| 110 | "//extensions/browser:unit_tests", |
| 111 | "//extensions/common:unit_tests", |
| 112 | "//extensions/renderer:unit_tests", |
| 113 | "//extensions/shell:browser_tests", |
| 114 | "//extensions/shell:unit_tests", |
| 115 | "//extensions/utility:unit_tests", |
jbroman | b5e3179 | 2015-12-09 17:13:02 | [diff] [blame] | 116 | "//gin/*", |
tfarina | 9ee68196 | 2015-03-02 03:20:13 | [diff] [blame] | 117 | "//google_apis/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 118 | "//google_update/*", |
brettw | 09039c1 | 2016-03-18 03:22:46 | [diff] [blame] | 119 | "//gpu/*", |
tfarina | f8972243 | 2015-05-15 19:30:19 | [diff] [blame] | 120 | |
sdefresne | 5f39d8e6 | 2016-05-18 19:27:37 | [diff] [blame] | 121 | "//ios/*", |
| 122 | "//ios_internal/*", |
brettw | e75311d | 2015-02-17 23:56:46 | [diff] [blame] | 123 | "//ipc/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 124 | |
| 125 | #"//jingle/*", |
sky | b044635 | 2015-11-18 00:43:56 | [diff] [blame] | 126 | "//mash/*", |
sky | 88d7709e | 2015-08-12 19:19:49 | [diff] [blame] | 127 | |
Dale Curtis | f4b6de13 | 2017-08-22 04:04:05 | [diff] [blame] | 128 | "//media/*", |
| 129 | "//mojo/*", |
sky | d412f6e | 2015-07-22 17:22:13 | [diff] [blame] | 130 | |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 131 | #"//native_client/*", |
brettw | 25ca892 | 2016-03-18 22:59:58 | [diff] [blame] | 132 | "//net/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 133 | |
| 134 | #"//pdf/*", # Medium-hard. |
| 135 | #"//ppapi/*", # Lots of errors. |
jbroman | 86f7827 | 2015-12-31 00:00:51 | [diff] [blame] | 136 | "//ppapi/examples/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 137 | "//printing/*", |
| 138 | |
| 139 | #"//remoting/*", # Medium-hard. |
brettw | 09039c1 | 2016-03-18 03:22:46 | [diff] [blame] | 140 | "//rlz/*", |
| 141 | |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 142 | #"//sandbox/*", # Medium-hard. |
sky | 1e8f9f86 | 2016-05-19 22:34:43 | [diff] [blame] | 143 | "//services/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 144 | "//skia/*", |
| 145 | "//sql/*", |
| 146 | "//storage/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 147 | "//testing/*", |
| 148 | |
| 149 | #"//third_party/*", # May not ever want this. |
Mark Mentovai | ebb9ddd | 2017-09-25 17:24:41 | [diff] [blame] | 150 | "//third_party/breakpad/*", |
wychen | a10837e | 2017-05-01 16:10:16 | [diff] [blame] | 151 | "//third_party/brotli/*", |
rouslan | 30b1829 | 2016-03-31 18:05:10 | [diff] [blame] | 152 | "//third_party/hunspell/*", |
Thiago Farina | d7d6885 | 2017-05-18 14:21:49 | [diff] [blame] | 153 | "//third_party/leveldatabase/*", |
rouslan | 30b1829 | 2016-03-31 18:05:10 | [diff] [blame] | 154 | "//third_party/libaddressinput/*", |
| 155 | "//third_party/libphonenumber/*", |
wychen | befe028 | 2017-05-02 19:03:51 | [diff] [blame] | 156 | "//third_party/libwebp/*", |
Thiago Farina | d7d6885 | 2017-05-18 14:21:49 | [diff] [blame] | 157 | "//third_party/snappy/*", |
wychen | c50f819 | 2017-05-09 04:37:44 | [diff] [blame] | 158 | "//third_party/WebKit/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 159 | "//tools/*", |
| 160 | |
kylechar | d51a15f3 | 2017-09-11 17:25:30 | [diff] [blame] | 161 | "//ui/*", |
brettw | bc44c0a9 | 2015-02-20 22:30:39 | [diff] [blame] | 162 | "//url/*", |
| 163 | "//v8/*", |
brettw | 0ead977 | 2015-11-23 23:12:08 | [diff] [blame] | 164 | "//win8/*", |
brettw | e75311d | 2015-02-17 23:56:46 | [diff] [blame] | 165 | ] |
brettw | ed99f7b | 2015-04-07 00:22:50 | [diff] [blame] | 166 | |
| 167 | # These are the list of GN files that run exec_script. This whitelist exists |
| 168 | # to force additional review for new uses of exec_script, which is strongly |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 169 | # discouraged. |
| 170 | # |
| 171 | # GYPI_TO_GN |
| 172 | # |
brettw | 5bbea15 | 2017-02-16 00:43:44 | [diff] [blame] | 173 | # Some of these entries are for legacy gypi_to_gn calls. We should not be |
| 174 | # adding new calls to this script in the build (see //build/gypi_to_gn.py for |
| 175 | # detailed advice). The only time you should be editing this list for |
| 176 | # gypi_to_gn purposes is when moving an existing call to a different place. |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 177 | # |
| 178 | # PLEASE READ |
| 179 | # |
| 180 | # You should almost never need to add new exec_script calls. exec_script is |
| 181 | # slow, especially on Windows, and can cause confusing effects. Although |
| 182 | # individually each call isn't slow or necessarily very confusing, at the scale |
| 183 | # of our repo things get out of hand quickly. By strongly pushing back on all |
| 184 | # additions, we keep the build fast and clean. If you think you need to add a |
| 185 | # new call, please consider: |
| 186 | # |
| 187 | # - Do not use a script to check for the existance of a file or directory to |
| 188 | # enable a different mode. Instead, use GN build args to enable or disable |
| 189 | # functionality and set options. An example is checking for a file in the |
| 190 | # src-internal repo to see if the corresponding src-internal feature should |
| 191 | # be enabled. There are several things that can go wrong with this: |
| 192 | # |
| 193 | # - It's mysterious what causes some things to happen. Although in many cases |
| 194 | # such behavior can be conveniently automatic, GN optimizes for explicit |
| 195 | # and obvious behavior so people can more easily diagnose problems. |
| 196 | # |
| 197 | # - The user can't enable a mode for one build and not another. With GN build |
| 198 | # args, the user can choose the exact configuration of multiple builds |
| 199 | # using one checkout. But implicitly basing flags on the state of the |
| 200 | # checkout, this functionality is broken. |
| 201 | # |
| 202 | # - It's easy to get stale files. If for example the user edits the gclient |
| 203 | # to stop checking out src-internal (or any other optional thing), it's |
| 204 | # easy to end up with stale files still mysteriously triggering build |
| 205 | # conditions that are no longer appropriate (yes, this happens in real |
| 206 | # life). |
| 207 | # |
| 208 | # - Do not use a script to iterate files in a directory (glob): |
| 209 | # |
| 210 | # - This has the same "stale file" problem as the above discussion. Various |
| 211 | # operations can leave untracked files in the source tree which can cause |
| 212 | # surprising effects. |
| 213 | # |
| 214 | # - It becomes impossible to use "git grep" to find where a certain file is |
| 215 | # referenced. This operation is very common and people really do get |
| 216 | # confused when things aren't listed. |
| 217 | # |
| 218 | # - It's easy to screw up. One common case is a build-time script that packs |
| 219 | # up a directory. The author notices that the script isn't re-run when the |
| 220 | # directory is updated, so adds a glob so all the files are listed as |
| 221 | # inputs. This seems to work great... until a file is deleted. When a |
thakis | 3e861de | 2016-06-14 14:24:01 | [diff] [blame] | 222 | # 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] | 223 | # and no command-lines will have been changed. The action will not be |
| 224 | # re-run and the build will be broken. It is possible to get this correct |
| 225 | # using glob, and it's possible to mess it up without glob, but globs make |
| 226 | # this situation much easier to create. if the build always lists the |
| 227 | # files and passes them to a script, it will always be correct. |
dgn | 47095171 | 2015-04-07 10:37:47 | [diff] [blame] | 228 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 229 | exec_script_whitelist = |
| 230 | build_dotfile_settings.exec_script_whitelist + [ |
| 231 | # Whitelist entries for //build should go into |
| 232 | # //build/dotfile_settings.gni instead, so that they can be shared |
| 233 | # with other repos. The entries in this list should be only for files |
| 234 | # in the Chromium repo outside of //build. |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 235 | "//build_overrides/build.gni", |
dgn | 47095171 | 2015-04-07 10:37:47 | [diff] [blame] | 236 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 237 | # TODO(dgn): Layer violation but breaks the build otherwise, see |
| 238 | # https://crbug.com/474506. |
| 239 | "//clank/java/BUILD.gn", |
| 240 | "//clank/native/BUILD.gn", |
brettw | 46134cb | 2016-09-02 23:53:18 | [diff] [blame] | 241 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 242 | "//remoting/host/installer/linux/BUILD.gn", |
| 243 | "//remoting/remoting_version.gni", |
| 244 | "//remoting/host/installer/win/generate_clsids.gni", |
brettw | de7b265 | 2016-09-09 23:25:05 | [diff] [blame] | 245 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 246 | # TODO(dpranke): Get these from the appropriate repos instead. |
| 247 | "//third_party/angle/BUILD.gn", |
| 248 | "//third_party/angle/src/tests/BUILD.gn", |
| 249 | "//third_party/angle/src/vulkan_support/BUILD.gn", |
| 250 | "//third_party/catapult/tracing/BUILD.gn", |
| 251 | "//third_party/google_input_tools/inputview.gni", |
| 252 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 253 | "//tools/grit/grit_rule.gni", |
| 254 | |
| 255 | # Not gypi-to-gn. |
| 256 | "//google_apis/BUILD.gn", |
| 257 | "//printing/BUILD.gn", |
| 258 | ] |