[M94 Dev][EFL] Fix gn errors to generate ninja files
[platform/framework/web/chromium-efl.git] / tizen_src / .gn
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
5 import("//build/dotfile_settings.gni")
6 import("//third_party/angle/dotfile_settings.gni")
7
8 # The location of the build configuration file.
9 buildconfig = "//build/config/BUILDCONFIG.gn"
10
11 # The secondary source root is a parallel directory tree where
12 # GN build files are placed when they can not be placed directly
13 # in the source tree, e.g. for third party source trees.
14 secondary_source = "//build/secondary/"
15
16 # The python interpreter to use by default. On Windows, this will look
17 # for python3.exe and python3.bat.
18 script_executable = "python3"
19
20 # These arguments override the default values for items in a declare_args
21 # block. "gn args" in turn can override these.
22 #
23 # In general the value for a build arg in the declare_args block should be the
24 # default. In some cases, a DEPS-ed in project will want different defaults for
25 # being built as part of Chrome vs. being built standalone. In this case, the
26 # Chrome defaults should go here. There should be no overrides here for
27 # values declared in the main Chrome repository.
28 #
29 # Important note for defining defaults: This file is executed before the
30 # BUILDCONFIG.gn file. That file sets up the global variables like "is_ios".
31 # This means that the default_args can not depend on the platform,
32 # architecture, or other build parameters. If you really need that, the other
33 # repo should define a flag that toggles on a behavior that implements the
34 # additional logic required by Chrome to set the variables.
35 default_args = {
36   # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints
37   # a warning that "Build argument has no effect". When adding a v8 variable, it
38   # also needs to be defined to src/ios/BUILD.gn (respectively removed from both
39   # location when it is removed).
40
41   v8_extra_library_files = []
42   v8_experimental_extra_library_files = []
43   v8_enable_gdbjit = false
44   v8_imminent_deprecation_warnings = false
45
46   # Don't include webrtc's builtin task queue implementation.
47   rtc_link_task_queue_impl = false
48
49   # Don't include the iLBC audio codec.
50   # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
51   # deps on codecs, we can remove this.
52   rtc_include_ilbc = false
53
54   # Changes some setup for the Crashpad build to set them to build against
55   # Chromium's zlib, base, etc.
56   crashpad_dependencies = "chromium"
57
58   # Override ANGLE's Vulkan dependencies.
59   angle_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src"
60   angle_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
61   angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src"
62   angle_vulkan_validation_layers_dir =
63       "//third_party/vulkan-deps/vulkan-validation-layers/src"
64 }
65
66 # These are the targets to skip header checking by default. The files in targets
67 # matching these patterns (see "gn help label_pattern" for format) will not have
68 # their includes checked for proper dependencies when you run either
69 # "gn check" or "gn gen --check".
70 no_check_targets = [
71   "//extensions:*",  # 28 errors
72   "//headless:*",  # 107 errors
73
74   "//third_party/icu/*",
75   "//third_party/libwebp:*",  # 7 errors, https://crbug.com/800762
76
77   # //v8, https://crbug.com/v8/7330
78   "//v8/src/inspector:inspector",  # 20 errors
79   "//v8/test/cctest:cctest_sources",  # 2 errors
80   "//v8:cppgc_base",  # 1 error
81   "//v8:v8_internal_headers",  # 11 errors
82   "//v8:v8_libplatform",  # 2 errors
83 ]
84
85 # These are the list of GN files that run exec_script. This whitelist exists
86 # to force additional review for new uses of exec_script, which is strongly
87 # discouraged.
88 #
89 # PLEASE READ
90 #
91 # You should almost never need to add new exec_script calls. exec_script is
92 # slow, especially on Windows, and can cause confusing effects. Although
93 # individually each call isn't slow or necessarily very confusing, at the scale
94 # of our repo things get out of hand quickly. By strongly pushing back on all
95 # additions, we keep the build fast and clean. If you think you need to add a
96 # new call, please consider:
97 #
98 # - Do not use a script to check for the existence of a file or directory to
99 #   enable a different mode. Instead, use GN build args to enable or disable
100 #   functionality and set options. An example is checking for a file in the
101 #   src-internal repo to see if the corresponding src-internal feature should
102 #   be enabled. There are several things that can go wrong with this:
103 #
104 #    - It's mysterious what causes some things to happen. Although in many cases
105 #      such behavior can be conveniently automatic, GN optimizes for explicit
106 #      and obvious behavior so people can more easily diagnose problems.
107 #
108 #    - The user can't enable a mode for one build and not another. With GN build
109 #      args, the user can choose the exact configuration of multiple builds
110 #      using one checkout. But implicitly basing flags on the state of the
111 #      checkout, this functionality is broken.
112 #
113 #    - It's easy to get stale files. If for example the user edits the gclient
114 #      to stop checking out src-internal (or any other optional thing), it's
115 #      easy to end up with stale files still mysteriously triggering build
116 #      conditions that are no longer appropriate (yes, this happens in real
117 #      life).
118 #
119 # - Do not use a script to iterate files in a directory (glob):
120 #
121 #    - This has the same "stale file" problem as the above discussion. Various
122 #      operations can leave untracked files in the source tree which can cause
123 #      surprising effects.
124 #
125 #    - It becomes impossible to use "git grep" to find where a certain file is
126 #      referenced. This operation is very common and people really do get
127 #      confused when things aren't listed.
128 #
129 #    - It's easy to screw up. One common case is a build-time script that packs
130 #      up a directory. The author notices that the script isn't re-run when the
131 #      directory is updated, so adds a glob so all the files are listed as
132 #      inputs. This seems to work great... until a file is deleted. When a
133 #      file is deleted, all the inputs the glob lists will still be up to date
134 #      and no command-lines will have been changed. The action will not be
135 #      re-run and the build will be broken. It is possible to get this correct
136 #      using glob, and it's possible to mess it up without glob, but globs make
137 #      this situation much easier to create. if the build always lists the
138 #      files and passes them to a script, it will always be correct.
139
140 exec_script_whitelist =
141     build_dotfile_settings.exec_script_whitelist +
142     angle_dotfile_settings.exec_script_whitelist +
143     [
144       # Whitelist entries for //build should go into
145       # //build/dotfile_settings.gni instead, so that they can be shared
146       # with other repos. The entries in this list should be only for files
147       # in the Chromium repo outside of //build.
148       "//build_overrides/build.gni",
149
150       "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
151
152       # TODO(dgn): Layer violation but breaks the build otherwise, see
153       # https://crbug.com/474506.
154       "//clank/java/BUILD.gn",
155       "//clank/native/BUILD.gn",
156
157       "//google_apis/BUILD.gn",
158       "//printing/BUILD.gn",
159
160       "//remoting/host/installer/linux/BUILD.gn",
161       "//remoting/remoting_version.gni",
162       "//remoting/host/installer/win/generate_clsids.gni",
163
164       "//tools/grit/grit_rule.gni",
165       "//tools/gritsettings/BUILD.gn",
166     ]