Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(814)

Side by Side Diff: chrome/BUILD.gn

Issue 2910383002: mash: Add catalog/manifest etc. for telemetry tests binary for mash. (Closed)
Patch Set: . Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/app/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/compiler/compiler.gni") 6 import("//build/config/compiler/compiler.gni")
7 import("//build/config/compiler/pgo/pgo.gni") 7 import("//build/config/compiler/pgo/pgo.gni")
8 import("//build/config/features.gni") 8 import("//build/config/features.gni")
9 import("//build/config/locales.gni") 9 import("//build/config/locales.gni")
10 import("//build/config/sanitizers/sanitizers.gni") 10 import("//build/config/sanitizers/sanitizers.gni")
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ":chrome_initial", 119 ":chrome_initial",
120 ] 120 ]
121 if (is_win) { 121 if (is_win) {
122 public_deps += [ ":reorder_imports" ] 122 public_deps += [ ":reorder_imports" ]
123 } 123 }
124 if (use_aura && (is_win || is_linux)) { 124 if (use_aura && (is_win || is_linux)) {
125 data_deps += [ "//chrome/app:service_manifests" ] 125 data_deps += [ "//chrome/app:service_manifests" ]
126 } 126 }
127 } 127 }
128 128
129 executable("chrome_initial") { 129 template("chrome_binary") {
130 executable(target_name) {
131 output_name = invoker.output_name
132 sources = invoker.sources
133 if (defined(invoker.deps)) {
134 deps = invoker.deps
135 } else {
136 deps = []
137 }
138
139 if (!is_win || is_clang) {
140 # Normally, we need to pass specific flags to the linker to
141 # create an executable that gathers profile data. However, when
142 # using MSVC, we need to make sure we *don't* pass /GENPROFILE
143 # when linking without generating any code, or else the linker
144 # will give us fatal error LNK1264. So we add the PGO flags
145 # on all configurations, execpt MSVC on Windows.
146 configs += [ "//build/config/compiler/pgo:default_pgo_flags" ]
147 }
148
149 # Because the sources list varies so significantly per-platform, generally
150 # each platform lists its own files rather than relying on filtering or
151 # removing unused files.
152 sources += [ "app/chrome_exe_resource.h" ]
153 defines = []
154 public_deps = []
155 deps += [
156 "//build/config:exe_and_shlib_deps",
157 "//printing/features",
158 ]
159
160 data = [
161 "$root_out_dir/resources.pak",
162 ]
163 if (is_linux || is_win) {
164 data += [
165 "$root_out_dir/chrome_100_percent.pak",
166 "$root_out_dir/locales/en-US.pak",
167 "$root_out_dir/locales/fr.pak",
168 ]
169 }
170
171 data_deps = []
172
173 if (is_win) {
174 sources += [
175 "app/chrome_exe.rc",
176 "app/chrome_exe_load_config_win.cc",
177 "app/chrome_exe_main_win.cc",
178 "app/chrome_watcher_client_win.cc",
179 "app/chrome_watcher_client_win.h",
180 "app/chrome_watcher_command_line_win.cc",
181 "app/chrome_watcher_command_line_win.h",
182 "app/main_dll_loader_win.cc",
183 "app/main_dll_loader_win.h",
184 "common/crash_keys.cc",
185 "common/crash_keys.h",
186 ]
187
188 deps += [
189 ":chrome_dll",
190 ":chrome_exe_version",
191 ":copy_first_run",
192 ":file_pre_reader",
193 ":visual_elements_resources",
194 "//base",
195 "//breakpad:breakpad_handler",
196 "//breakpad:breakpad_sender",
197 "//chrome/app/version_assembly:chrome_exe_manifest",
198 "//chrome/browser:chrome_process_finder",
199 "//chrome/chrome_watcher",
200 "//chrome/chrome_watcher:client",
201 "//chrome/common:constants",
202 "//chrome/common:metrics_constants_util_win",
203 "//chrome/install_static:secondary_module",
204 "//chrome/installer/util:with_no_strings",
205 "//chrome_elf",
206 "//components/browser_watcher:browser_watcher_client",
207 "//components/crash/content/app:run_as_crashpad_handler",
208 "//components/flags_ui:switches",
209 "//content:sandbox_helper_win",
210 "//content/public/common:static_switches",
211 "//crypto",
212 "//gpu/config:crash_keys",
213 "//sandbox",
214 ]
215 data_deps = [
216 "//chrome/app/version_assembly:version_assembly_manifest",
217 ]
218
219 if (win_console_app) {
220 defines += [ "WIN_CONSOLE_APP" ]
221 } else {
222 # Set /SUBSYSTEM:WINDOWS for chrome.exe itself, unless a console build
223 # has been requested.
224 configs -= [ "//build/config/win:console" ]
225 configs += [ "//build/config/win:windowed" ]
226 }
227
228 ldflags = [
229 "/DELAYLOAD:dbghelp.dll",
230 "/DELAYLOAD:dwmapi.dll",
231 "/DELAYLOAD:uxtheme.dll",
232 "/DELAYLOAD:ole32.dll",
233 "/DELAYLOAD:oleaut32.dll",
234 ]
235
236 if (current_cpu == "x64") {
237 # Increase the initial stack size. The default is 1MB, this is 2MB.
238 ldflags += [ "/STACK:2097152" ]
239 }
240 }
241
242 if (is_linux) {
243 sources += [
244 "app/chrome_dll_resource.h",
245 "app/chrome_main.cc",
246 "app/chrome_main_delegate.cc",
247 "app/chrome_main_delegate.h",
248 ]
249
250 deps += [
251 # On Linux, link the dependencies (libraries) that make up actual
252 # Chromium functionality directly into the executable.
253 ":browser_dependencies",
254 ":child_dependencies",
255 ":manpage",
256
257 # Needed to use the master_preferences functions
258 "//chrome/installer/util:with_no_strings",
259 "//content/public/app:both",
260 "//content/public/common:service_names",
261
262 # For headless mode.
263 "//headless:headless_shell_lib",
264 "//services/service_manager/embedder",
265 ]
266
267 public_deps = [
268 ":xdg_mime", # Needs to be public for installer to consume files.
269 "//chrome/common:features",
270 ]
271
272 ldflags = [ "-pie" ]
273
274 # Chrome OS debug builds for arm need to pass --long-plt to the linker.
275 # See https://bugs.chromium.org/p/chromium/issues/detail?id=583532
276 if (is_chromeos && is_debug && target_cpu == "arm") {
277 ldflags += [ "-Wl,--long-plt" ]
278 }
279
280 if (use_pango || use_cairo) {
281 # Needed for chrome_main.cc initialization of libraries.
282 configs += [ "//build/config/linux/pangocairo" ]
283 }
284
285 if (use_x11) {
286 configs += [
287 "//build/config/linux:x11",
288 "//build/config/linux:xext",
289 ]
290 }
291
292 if (enable_package_mash_services) {
293 deps += embedded_mash_service_deps
294 }
295 }
296
297 # These files are used by the installer so we need a public dep.
298 public_deps += [ ":packed_resources" ]
299
300 # Only ChromeOS has precompiled Flash that needs to get copied to the outp ut
301 # directory. On other platforms, Flash is either component-updated only or
302 # not supported at all.
303 if (is_chromeos) {
304 deps += [ "//third_party/adobe/flash:flapper_binaries" ]
305 }
306
307 data_deps += [ "//third_party/widevine/cdm:widevinecdmadapter" ]
308
309 if (is_multi_dll_chrome) {
310 defines += [ "CHROME_MULTIPLE_DLL" ]
311 data_deps += [ ":chrome_child" ]
312 }
313 }
314 }
315
316 chrome_binary("chrome_initial") {
130 if (is_win) { 317 if (is_win) {
131 output_name = "initialexe/chrome" 318 output_name = "initialexe/chrome"
132 } else { 319 } else {
133 output_name = "chrome" 320 output_name = "chrome"
134 } 321 }
135 322
136 if (!is_win || is_clang) { 323 sources = []
137 # Normally, we need to pass specific flags to the linker to 324 if (!is_win && use_aura) {
138 # create an executable that gathers profile data. However, when
139 # using MSVC, we need to make sure we *don't* pass /GENPROFILE
140 # when linking without generating any code, or else the linker
141 # will give us fatal error LNK1264. So we add the PGO flags
142 # on all configurations, execpt MSVC on Windows.
143 configs += [ "//build/config/compiler/pgo:default_pgo_flags" ]
144 }
145
146 # Because the sources list varies so significantly per-platform, generally
147 # each platform lists its own files rather than relying on filtering or
148 # removing unused files.
149 sources = [
150 "app/chrome_exe_resource.h",
151 ]
152 defines = []
153 public_deps = []
154 deps = [
155 "//build/config:exe_and_shlib_deps",
156 "//printing/features",
157 ]
158
159 data = [
160 "$root_out_dir/resources.pak",
161 ]
162 if (is_linux || is_win) {
163 data += [
164 "$root_out_dir/chrome_100_percent.pak",
165 "$root_out_dir/locales/en-US.pak",
166 "$root_out_dir/locales/fr.pak",
167 ]
168 }
169
170 data_deps = []
171
172 if (is_win) {
173 sources += [
174 "app/chrome_exe.rc",
175 "app/chrome_exe_load_config_win.cc",
176 "app/chrome_exe_main_win.cc",
177 "app/chrome_watcher_client_win.cc",
178 "app/chrome_watcher_client_win.h",
179 "app/chrome_watcher_command_line_win.cc",
180 "app/chrome_watcher_command_line_win.h",
181 "app/main_dll_loader_win.cc",
182 "app/main_dll_loader_win.h",
183 "common/crash_keys.cc",
184 "common/crash_keys.h",
185 ]
186
187 deps += [
188 ":chrome_dll",
189 ":chrome_exe_version",
190 ":copy_first_run",
191 ":file_pre_reader",
192 ":visual_elements_resources",
193 "//base",
194 "//breakpad:breakpad_handler",
195 "//breakpad:breakpad_sender",
196 "//chrome/app/version_assembly:chrome_exe_manifest",
197 "//chrome/browser:chrome_process_finder",
198 "//chrome/chrome_watcher",
199 "//chrome/chrome_watcher:client",
200 "//chrome/common:constants",
201 "//chrome/common:metrics_constants_util_win",
202 "//chrome/install_static:secondary_module",
203 "//chrome/installer/util:with_no_strings",
204 "//chrome_elf",
205 "//components/browser_watcher:browser_watcher_client",
206 "//components/crash/content/app:run_as_crashpad_handler",
207 "//components/flags_ui:switches",
208 "//content:sandbox_helper_win",
209 "//content/public/common:static_switches",
210 "//crypto",
211 "//gpu/config:crash_keys",
212 "//sandbox",
213 ]
214 data_deps = [
215 "//chrome/app/version_assembly:version_assembly_manifest",
216 ]
217
218 if (win_console_app) {
219 defines += [ "WIN_CONSOLE_APP" ]
220 } else {
221 # Set /SUBSYSTEM:WINDOWS for chrome.exe itself, unless a console build
222 # has been requested.
223 configs -= [ "//build/config/win:console" ]
224 configs += [ "//build/config/win:windowed" ]
225 }
226
227 ldflags = [
228 "/DELAYLOAD:dbghelp.dll",
229 "/DELAYLOAD:dwmapi.dll",
230 "/DELAYLOAD:uxtheme.dll",
231 "/DELAYLOAD:ole32.dll",
232 "/DELAYLOAD:oleaut32.dll",
233 ]
234
235 if (current_cpu == "x64") {
236 # Increase the initial stack size. The default is 1MB, this is 2MB.
237 ldflags += [ "/STACK:2097152" ]
238 }
239 } else if (use_aura) {
240 # Non-Windows aura entrypoint. 325 # Non-Windows aura entrypoint.
241 sources += [ "app/chrome_exe_main_aura.cc" ] 326 sources += [ "app/chrome_exe_main_aura.cc" ]
242 } 327 }
243 328 }
244 if (is_linux) { 329
245 sources += [ 330 if (enable_package_mash_services) {
246 "app/chrome_dll_resource.h", 331 chrome_binary("chrome_test") {
247 "app/chrome_main.cc", 332 # Note that the output name needs to end with "chrome", because that's wha t
248 "app/chrome_main_delegate.cc", 333 # telemetry test-runner expects.
249 "app/chrome_main_delegate.h", 334 output_name = "test_chrome"
335 sources = []
336 deps = [
337 "//chrome/app/mash:chrome_test_catalog",
250 ] 338 ]
251 339 if (!is_win && use_aura) {
252 deps += [ 340 sources += [ "app/chrome_test_exe_main_aura.cc" ]
253 # On Linux, link the dependencies (libraries) that make up actual 341 }
254 # Chromium functionality directly into the executable.
255 ":browser_dependencies",
256 ":child_dependencies",
257 ":manpage",
258
259 # Needed to use the master_preferences functions
260 "//chrome/installer/util:with_no_strings",
261 "//content/public/app:both",
262 "//content/public/common:service_names",
263
264 # For headless mode.
265 "//headless:headless_shell_lib",
266 "//services/service_manager/embedder",
267 ]
268
269 public_deps = [
270 ":xdg_mime", # Needs to be public for installer to consume files.
271 "//chrome/common:features",
272 ]
273
274 ldflags = [ "-pie" ]
275
276 # Chrome OS debug builds for arm need to pass --long-plt to the linker.
277 # See https://bugs.chromium.org/p/chromium/issues/detail?id=583532
278 if (is_chromeos && is_debug && target_cpu == "arm") {
279 ldflags += [ "-Wl,--long-plt" ]
280 }
281
282 if (use_pango || use_cairo) {
283 # Needed for chrome_main.cc initialization of libraries.
284 configs += [ "//build/config/linux/pangocairo" ]
285 }
286
287 if (use_x11) {
288 configs += [
289 "//build/config/linux:x11",
290 "//build/config/linux:xext",
291 ]
292 }
293
294 if (enable_package_mash_services) {
295 deps += embedded_mash_service_deps
296 }
297 }
298
299 # These files are used by the installer so we need a public dep.
300 public_deps += [ ":packed_resources" ]
301
302 # Only ChromeOS has precompiled Flash that needs to get copied to the output
303 # directory. On other platforms, Flash is either component-updated only or
304 # not supported at all.
305 if (is_chromeos) {
306 deps += [ "//third_party/adobe/flash:flapper_binaries" ]
307 }
308
309 data_deps += [ "//third_party/widevine/cdm:widevinecdmadapter" ]
310
311 if (is_multi_dll_chrome) {
312 defines += [ "CHROME_MULTIPLE_DLL" ]
313 data_deps += [ ":chrome_child" ]
314 } 342 }
315 } 343 }
316 } # !is_android && !is_mac 344 } # !is_android && !is_mac
317 345
318 if (is_win) { 346 if (is_win) {
319 # This target is a forwarding target to compile the necessary DLLs used 347 # This target is a forwarding target to compile the necessary DLLs used
320 # by Chrome. 348 # by Chrome.
321 group("chrome_dll") { 349 group("chrome_dll") {
322 data_deps = [ 350 data_deps = [
323 ":main_dll", 351 ":main_dll",
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 "//chrome/app/theme/$branding_path_component/product_logo_48.png", 1803 "//chrome/app/theme/$branding_path_component/product_logo_48.png",
1776 "//chrome/tools/build/linux/chrome-wrapper", 1804 "//chrome/tools/build/linux/chrome-wrapper",
1777 "//third_party/xdg-utils/scripts/xdg-mime", 1805 "//third_party/xdg-utils/scripts/xdg-mime",
1778 "//third_party/xdg-utils/scripts/xdg-settings", 1806 "//third_party/xdg-utils/scripts/xdg-settings",
1779 ] 1807 ]
1780 outputs = [ 1808 outputs = [
1781 "$root_out_dir/{{source_file_part}}", 1809 "$root_out_dir/{{source_file_part}}",
1782 ] 1810 ]
1783 } 1811 }
1784 } 1812 }
OLDNEW
« no previous file with comments | « no previous file | chrome/app/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698