.gn 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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.
  4. import("//build/dotfile_settings.gni")
  5. import("//third_party/angle/dotfile_settings.gni")
  6. # The location of the build configuration file.
  7. buildconfig = "//build/config/BUILDCONFIG.gn"
  8. # The python interpreter to use by default. On Windows, this will look
  9. # for python3.exe and python3.bat.
  10. script_executable = "python3"
  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.
  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.
  26. default_args = {
  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. v8_enable_gdbjit = false
  32. v8_imminent_deprecation_warnings = false
  33. # Don't include webrtc's builtin task queue implementation.
  34. rtc_link_task_queue_impl = false
  35. # Don't include the iLBC audio codec.
  36. # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
  37. # deps on codecs, we can remove this.
  38. rtc_include_ilbc = false
  39. # Changes some setup for the Crashpad build to set them to build against
  40. # Chromium's zlib, base, etc.
  41. crashpad_dependencies = "chromium"
  42. # Override ANGLE's Vulkan dependencies.
  43. angle_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src"
  44. angle_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
  45. angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src"
  46. angle_vulkan_validation_layers_dir =
  47. "//third_party/vulkan-deps/vulkan-validation-layers/src"
  48. # Overwrite default args declared in the Fuchsia sdk
  49. fuchsia_sdk_readelf_exec =
  50. "//third_party/llvm-build/Release+Asserts/bin/llvm-readelf"
  51. fuchsia_target_api_level = 9
  52. devtools_visibility = [ "*" ]
  53. }
  54. # These are the targets to skip header checking by default. The files in targets
  55. # matching these patterns (see "gn help label_pattern" for format) will not have
  56. # their includes checked for proper dependencies when you run either
  57. # "gn check" or "gn gen --check".
  58. no_check_targets = [
  59. "//headless:headless_non_renderer", # 2 errors
  60. "//headless:headless_renderer", # 12 errors
  61. "//headless:headless_shared_sources", # 2 errors
  62. "//headless:headless_shell_browser_lib", # 1 errors
  63. # //v8, https://crbug.com/v8/7330
  64. "//v8/src/inspector:inspector", # 20 errors
  65. "//v8/test/cctest:cctest_sources", # 2 errors
  66. "//v8:cppgc_base", # 1 error
  67. "//v8:v8_internal_headers", # 11 errors
  68. "//v8:v8_libplatform", # 2 errors
  69. # After making partition_alloc a standalone library, remove partition_alloc
  70. # target from the skip list, because partition_aloc will depend on its own
  71. # base.
  72. # partition alloc standalone library bug is https://crbug.com/1151236.
  73. "//base/allocator/partition_allocator:partition_alloc", # 292 errors
  74. ]
  75. # These are the list of GN files that run exec_script. This whitelist exists
  76. # to force additional review for new uses of exec_script, which is strongly
  77. # discouraged.
  78. #
  79. # PLEASE READ
  80. #
  81. # You should almost never need to add new exec_script calls. exec_script is
  82. # slow, especially on Windows, and can cause confusing effects. Although
  83. # individually each call isn't slow or necessarily very confusing, at the scale
  84. # of our repo things get out of hand quickly. By strongly pushing back on all
  85. # additions, we keep the build fast and clean. If you think you need to add a
  86. # new call, please consider:
  87. #
  88. # - Do not use a script to check for the existence of a file or directory to
  89. # enable a different mode. Instead, use GN build args to enable or disable
  90. # functionality and set options. An example is checking for a file in the
  91. # src-internal repo to see if the corresponding src-internal feature should
  92. # be enabled. There are several things that can go wrong with this:
  93. #
  94. # - It's mysterious what causes some things to happen. Although in many cases
  95. # such behavior can be conveniently automatic, GN optimizes for explicit
  96. # and obvious behavior so people can more easily diagnose problems.
  97. #
  98. # - The user can't enable a mode for one build and not another. With GN build
  99. # args, the user can choose the exact configuration of multiple builds
  100. # using one checkout. But implicitly basing flags on the state of the
  101. # checkout, this functionality is broken.
  102. #
  103. # - It's easy to get stale files. If for example the user edits the gclient
  104. # to stop checking out src-internal (or any other optional thing), it's
  105. # easy to end up with stale files still mysteriously triggering build
  106. # conditions that are no longer appropriate (yes, this happens in real
  107. # life).
  108. #
  109. # - Do not use a script to iterate files in a directory (glob):
  110. #
  111. # - This has the same "stale file" problem as the above discussion. Various
  112. # operations can leave untracked files in the source tree which can cause
  113. # surprising effects.
  114. #
  115. # - It becomes impossible to use "git grep" to find where a certain file is
  116. # referenced. This operation is very common and people really do get
  117. # confused when things aren't listed.
  118. #
  119. # - It's easy to screw up. One common case is a build-time script that packs
  120. # up a directory. The author notices that the script isn't re-run when the
  121. # directory is updated, so adds a glob so all the files are listed as
  122. # inputs. This seems to work great... until a file is deleted. When a
  123. # file is deleted, all the inputs the glob lists will still be up to date
  124. # and no command-lines will have been changed. The action will not be
  125. # re-run and the build will be broken. It is possible to get this correct
  126. # using glob, and it's possible to mess it up without glob, but globs make
  127. # this situation much easier to create. if the build always lists the
  128. # files and passes them to a script, it will always be correct.
  129. exec_script_whitelist =
  130. build_dotfile_settings.exec_script_whitelist +
  131. angle_dotfile_settings.exec_script_whitelist +
  132. [
  133. # Whitelist entries for //build should go into
  134. # //build/dotfile_settings.gni instead, so that they can be shared
  135. # with other repos. The entries in this list should be only for files
  136. # in the Chromium repo outside of //build.
  137. "//build_overrides/build.gni",
  138. "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
  139. "//chrome/version.gni",
  140. # TODO(dgn): Layer violation but breaks the build otherwise, see
  141. # https://crbug.com/474506.
  142. "//clank/java/BUILD.gn",
  143. "//clank/native/BUILD.gn",
  144. "//google_apis/BUILD.gn",
  145. "//printing/BUILD.gn",
  146. "//remoting/host/installer/linux/BUILD.gn",
  147. "//remoting/remoting_version.gni",
  148. "//remoting/host/installer/win/generate_clsids.gni",
  149. "//tools/grit/grit_rule.gni",
  150. "//tools/gritsettings/BUILD.gn",
  151. ]