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 | |
Dirk Pranke | a2d3c36 | 2021-04-13 21:39:42 | [diff] [blame] | 11 | # The python interpreter to use by default. On Windows, this will look |
| 12 | # for python3.exe and python3.bat. |
| 13 | script_executable = "python3" |
| 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_enable_gdbjit = false |
| 37 | v8_imminent_deprecation_warnings = false |
Jochen Eisinger | 8be7d37b | 2017-06-02 08:37:56 | [diff] [blame] | 38 | |
Niels Möller | 0a5db00 | 2017-10-17 13:22:16 | [diff] [blame] | 39 | # Don't include webrtc's builtin task queue implementation. |
| 40 | rtc_link_task_queue_impl = false |
Karl Wiberg | f3b599b | 2017-11-05 21:35:00 | [diff] [blame] | 41 | |
| 42 | # Don't include the iLBC audio codec. |
| 43 | # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal |
| 44 | # deps on codecs, we can remove this. |
| 45 | rtc_include_ilbc = false |
Robert Sesek | 9c29eaa | 2017-12-11 19:47:13 | [diff] [blame] | 46 | |
| 47 | # Changes some setup for the Crashpad build to set them to build against |
| 48 | # Chromium's zlib, base, etc. |
Scott Graham | ec25b51 | 2017-12-20 05:40:40 | [diff] [blame] | 49 | crashpad_dependencies = "chromium" |
Jamie Madill | 178f84e | 2020-12-18 00:47:58 | [diff] [blame] | 50 | |
| 51 | # Override ANGLE's Vulkan dependencies. |
| 52 | angle_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src" |
| 53 | angle_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src" |
| 54 | angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src" |
| 55 | angle_vulkan_validation_layers_dir = |
| 56 | "//third_party/vulkan-deps/vulkan-validation-layers/src" |
Alex Rudenko | 5e0e1bc | 2021-09-03 10:14:17 | [diff] [blame] | 57 | |
Chong Gu | f8e1de13 | 2021-11-18 15:32:40 | [diff] [blame] | 58 | # Overwrite default args declared in the Fuchsia sdk |
Chong Gu | 0bac5a5 | 2021-10-07 18:53:18 | [diff] [blame] | 59 | fuchsia_sdk_readelf_exec = |
| 60 | "//third_party/llvm-build/Release+Asserts/bin/llvm-readelf" |
| 61 | |
Alex Rudenko | 5e0e1bc | 2021-09-03 10:14:17 | [diff] [blame] | 62 | devtools_visibility = [ "*" ] |
brettw | 04a0e48 | 2017-01-25 21:29:59 | [diff] [blame] | 63 | } |
| 64 | |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 65 | # These are the targets to skip header checking by default. The files in targets |
| 66 | # matching these patterns (see "gn help label_pattern" for format) will not have |
brettw | 2bafab4 | 2014-11-27 18:36:17 | [diff] [blame] | 67 | # their includes checked for proper dependencies when you run either |
| 68 | # "gn check" or "gn gen --check". |
Erik Staab | 8a1acf4 | 2020-07-08 19:16:45 | [diff] [blame] | 69 | no_check_targets = [ |
Dan Elphick | 54b4f7b | 2021-05-04 14:31:40 | [diff] [blame] | 70 | # //v8, https://crbug.com/v8/7330 |
| 71 | "//v8/src/inspector:inspector", # 20 errors |
Feng Yu | 65edebf | 2022-08-24 16:59:10 | [diff] [blame] | 72 | "//v8/test/cctest:cctest_sources", # 15 errors |
| 73 | "//v8/test/unittests:inspector_unittests_sources", # 2 errors |
Dan Elphick | 54b4f7b | 2021-05-04 14:31:40 | [diff] [blame] | 74 | "//v8:cppgc_base", # 1 error |
| 75 | "//v8:v8_internal_headers", # 11 errors |
| 76 | "//v8:v8_libplatform", # 2 errors |
brettw | e75311d | 2015-02-17 23:56:46 | [diff] [blame] | 77 | ] |
brettw | ed99f7b | 2015-04-07 00:22:50 | [diff] [blame] | 78 | |
| 79 | # These are the list of GN files that run exec_script. This whitelist exists |
| 80 | # to force additional review for new uses of exec_script, which is strongly |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 81 | # discouraged. |
| 82 | # |
brettw | d385ecf | 2016-04-19 22:53:23 | [diff] [blame] | 83 | # PLEASE READ |
| 84 | # |
| 85 | # You should almost never need to add new exec_script calls. exec_script is |
| 86 | # slow, especially on Windows, and can cause confusing effects. Although |
| 87 | # individually each call isn't slow or necessarily very confusing, at the scale |
| 88 | # of our repo things get out of hand quickly. By strongly pushing back on all |
| 89 | # additions, we keep the build fast and clean. If you think you need to add a |
| 90 | # new call, please consider: |
| 91 | # |
Wei-Yin Chen (陳威尹) | fec2ace | 2018-08-10 23:31:24 | [diff] [blame] | 92 | # - 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] | 93 | # enable a different mode. Instead, use GN build args to enable or disable |
| 94 | # functionality and set options. An example is checking for a file in the |
| 95 | # src-internal repo to see if the corresponding src-internal feature should |
| 96 | # be enabled. There are several things that can go wrong with this: |
| 97 | # |
| 98 | # - It's mysterious what causes some things to happen. Although in many cases |
| 99 | # such behavior can be conveniently automatic, GN optimizes for explicit |
| 100 | # and obvious behavior so people can more easily diagnose problems. |
| 101 | # |
| 102 | # - The user can't enable a mode for one build and not another. With GN build |
| 103 | # args, the user can choose the exact configuration of multiple builds |
| 104 | # using one checkout. But implicitly basing flags on the state of the |
| 105 | # checkout, this functionality is broken. |
| 106 | # |
| 107 | # - It's easy to get stale files. If for example the user edits the gclient |
| 108 | # to stop checking out src-internal (or any other optional thing), it's |
| 109 | # easy to end up with stale files still mysteriously triggering build |
| 110 | # conditions that are no longer appropriate (yes, this happens in real |
| 111 | # life). |
| 112 | # |
| 113 | # - Do not use a script to iterate files in a directory (glob): |
| 114 | # |
| 115 | # - This has the same "stale file" problem as the above discussion. Various |
| 116 | # operations can leave untracked files in the source tree which can cause |
| 117 | # surprising effects. |
| 118 | # |
| 119 | # - It becomes impossible to use "git grep" to find where a certain file is |
| 120 | # referenced. This operation is very common and people really do get |
| 121 | # confused when things aren't listed. |
| 122 | # |
| 123 | # - It's easy to screw up. One common case is a build-time script that packs |
| 124 | # up a directory. The author notices that the script isn't re-run when the |
| 125 | # directory is updated, so adds a glob so all the files are listed as |
| 126 | # inputs. This seems to work great... until a file is deleted. When a |
thakis | 3e861de | 2016-06-14 14:24:01 | [diff] [blame] | 127 | # 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] | 128 | # and no command-lines will have been changed. The action will not be |
| 129 | # re-run and the build will be broken. It is possible to get this correct |
| 130 | # using glob, and it's possible to mess it up without glob, but globs make |
| 131 | # this situation much easier to create. if the build always lists the |
| 132 | # files and passes them to a script, it will always be correct. |
dgn | 47095171 | 2015-04-07 10:37:47 | [diff] [blame] | 133 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 134 | exec_script_whitelist = |
Jamie Madill | 7ec071b | 2018-02-06 20:16:38 | [diff] [blame] | 135 | build_dotfile_settings.exec_script_whitelist + |
| 136 | angle_dotfile_settings.exec_script_whitelist + |
| 137 | [ |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 138 | # Whitelist entries for //build should go into |
| 139 | # //build/dotfile_settings.gni instead, so that they can be shared |
| 140 | # with other repos. The entries in this list should be only for files |
| 141 | # in the Chromium repo outside of //build. |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 142 | "//build_overrides/build.gni", |
dgn | 47095171 | 2015-04-07 10:37:47 | [diff] [blame] | 143 | |
Peter Kotwicz | f4f4cd6 | 2019-06-11 19:57:38 | [diff] [blame] | 144 | "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", |
Andrew Grieve | 19a00ca | 2022-07-29 19:01:48 | [diff] [blame] | 145 | "//chrome/version.gni", |
Peter Kotwicz | f4f4cd6 | 2019-06-11 19:57:38 | [diff] [blame] | 146 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 147 | # TODO(dgn): Layer violation but breaks the build otherwise, see |
| 148 | # https://crbug.com/474506. |
| 149 | "//clank/java/BUILD.gn", |
| 150 | "//clank/native/BUILD.gn", |
brettw | 46134cb | 2016-09-02 23:53:18 | [diff] [blame] | 151 | |
Nico Weber | 097f64c | 2018-10-23 17:48:02 | [diff] [blame] | 152 | "//google_apis/BUILD.gn", |
| 153 | "//printing/BUILD.gn", |
| 154 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 155 | "//remoting/host/installer/linux/BUILD.gn", |
| 156 | "//remoting/remoting_version.gni", |
| 157 | "//remoting/host/installer/win/generate_clsids.gni", |
brettw | de7b265 | 2016-09-09 23:25:05 | [diff] [blame] | 158 | |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 159 | "//tools/grit/grit_rule.gni", |
Andrew Grieve | 11c825d7 | 2020-01-03 00:51:33 | [diff] [blame] | 160 | "//tools/gritsettings/BUILD.gn", |
dpranke | 1cfa531 | 2016-11-22 03:07:47 | [diff] [blame] | 161 | ] |