# This file is used by the GN meta build system to find the root of the source # tree and to set startup options. For documentation on the values set in this # file, run "gn help dotfile" at the command line. import("//build/dotfile_settings.gni") import("//third_party/angle/dotfile_settings.gni") # The location of the build configuration file. buildconfig = "//build/config/BUILDCONFIG.gn" # The python interpreter to use by default. On Windows, this will look # for python3.exe and python3.bat. script_executable = "python3" # These arguments override the default values for items in a declare_args # block. "gn args" in turn can override these. # # In general the value for a build arg in the declare_args block should be the # default. In some cases, a DEPS-ed in project will want different defaults for # being built as part of Chrome vs. being built standalone. In this case, the # Chrome defaults should go here. There should be no overrides here for # values declared in the main Chrome repository. # # Important note for defining defaults: This file is executed before the # BUILDCONFIG.gn file. That file sets up the global variables like "is_ios". # This means that the default_args can not depend on the platform, # architecture, or other build parameters. If you really need that, the other # repo should define a flag that toggles on a behavior that implements the # additional logic required by Chrome to set the variables. default_args = { # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints # a warning that "Build argument has no effect". When adding a v8 variable, it # also needs to be defined to src/ios/BUILD.gn (respectively removed from both # location when it is removed). v8_enable_gdbjit = false v8_imminent_deprecation_warnings = false # Don't include webrtc's builtin task queue implementation. rtc_link_task_queue_impl = false # Don't include the iLBC audio codec. # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal # deps on codecs, we can remove this. rtc_include_ilbc = false # Changes some setup for the Crashpad build to set them to build against # Chromium's zlib, base, etc. crashpad_dependencies = "chromium" # Override ANGLE's Vulkan dependencies. angle_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src" angle_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src" angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src" angle_vulkan_validation_layers_dir = "//third_party/vulkan-deps/vulkan-validation-layers/src" # Overwrite default args declared in the Fuchsia sdk fuchsia_sdk_readelf_exec = "//third_party/llvm-build/Release+Asserts/bin/llvm-readelf" fuchsia_target_api_level = 9 devtools_visibility = [ "*" ] } # These are the targets to skip header checking by default. The files in targets # matching these patterns (see "gn help label_pattern" for format) will not have # their includes checked for proper dependencies when you run either # "gn check" or "gn gen --check". no_check_targets = [ "//headless:headless_non_renderer", # 2 errors "//headless:headless_renderer", # 12 errors "//headless:headless_shared_sources", # 2 errors "//headless:headless_shell_browser_lib", # 1 errors # //v8, https://crbug.com/v8/7330 "//v8/src/inspector:inspector", # 20 errors "//v8/test/cctest:cctest_sources", # 2 errors "//v8:cppgc_base", # 1 error "//v8:v8_internal_headers", # 11 errors "//v8:v8_libplatform", # 2 errors # After making partition_alloc a standalone library, remove partition_alloc # target from the skip list, because partition_aloc will depend on its own # base. # partition alloc standalone library bug is https://crbug.com/1151236. "//base/allocator/partition_allocator:partition_alloc", # 292 errors ] # These are the list of GN files that run exec_script. This whitelist exists # to force additional review for new uses of exec_script, which is strongly # discouraged. # # PLEASE READ # # You should almost never need to add new exec_script calls. exec_script is # slow, especially on Windows, and can cause confusing effects. Although # individually each call isn't slow or necessarily very confusing, at the scale # of our repo things get out of hand quickly. By strongly pushing back on all # additions, we keep the build fast and clean. If you think you need to add a # new call, please consider: # # - Do not use a script to check for the existence of a file or directory to # enable a different mode. Instead, use GN build args to enable or disable # functionality and set options. An example is checking for a file in the # src-internal repo to see if the corresponding src-internal feature should # be enabled. There are several things that can go wrong with this: # # - It's mysterious what causes some things to happen. Although in many cases # such behavior can be conveniently automatic, GN optimizes for explicit # and obvious behavior so people can more easily diagnose problems. # # - The user can't enable a mode for one build and not another. With GN build # args, the user can choose the exact configuration of multiple builds # using one checkout. But implicitly basing flags on the state of the # checkout, this functionality is broken. # # - It's easy to get stale files. If for example the user edits the gclient # to stop checking out src-internal (or any other optional thing), it's # easy to end up with stale files still mysteriously triggering build # conditions that are no longer appropriate (yes, this happens in real # life). # # - Do not use a script to iterate files in a directory (glob): # # - This has the same "stale file" problem as the above discussion. Various # operations can leave untracked files in the source tree which can cause # surprising effects. # # - It becomes impossible to use "git grep" to find where a certain file is # referenced. This operation is very common and people really do get # confused when things aren't listed. # # - It's easy to screw up. One common case is a build-time script that packs # up a directory. The author notices that the script isn't re-run when the # directory is updated, so adds a glob so all the files are listed as # inputs. This seems to work great... until a file is deleted. When a # file is deleted, all the inputs the glob lists will still be up to date # and no command-lines will have been changed. The action will not be # re-run and the build will be broken. It is possible to get this correct # using glob, and it's possible to mess it up without glob, but globs make # this situation much easier to create. if the build always lists the # files and passes them to a script, it will always be correct. exec_script_whitelist = build_dotfile_settings.exec_script_whitelist + angle_dotfile_settings.exec_script_whitelist + [ # Whitelist entries for //build should go into # //build/dotfile_settings.gni instead, so that they can be shared # with other repos. The entries in this list should be only for files # in the Chromium repo outside of //build. "//build_overrides/build.gni", "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", "//chrome/version.gni", # TODO(dgn): Layer violation but breaks the build otherwise, see # https://crbug.com/474506. "//clank/java/BUILD.gn", "//clank/native/BUILD.gn", "//google_apis/BUILD.gn", "//printing/BUILD.gn", "//remoting/host/installer/linux/BUILD.gn", "//remoting/remoting_version.gni", "//remoting/host/installer/win/generate_clsids.gni", "//tools/grit/grit_rule.gni", "//tools/gritsettings/BUILD.gn", ]