OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 { | |
5 'conditions': [ | |
6 # Dummy target to allow chrome to require chrome_dll to build | |
7 # without actually linking to the library | |
8 ['OS=="mac"', { | |
9 'targets': [ | |
10 { | |
11 'target_name': 'chrome_dll_dependency_shim', | |
12 'type': 'executable', | |
13 'dependencies': [ | |
14 'chrome_dll', | |
15 ], | |
16 # In release, we end up with a strip step that is unhappy if there is | |
17 # no binary. Rather than check in a new file for this hack, just | |
18 # generate a source file on the fly. | |
19 'actions': [ | |
20 { | |
21 'action_name': 'generate_stub_main', | |
22 'process_outputs_as_sources': 1, | |
23 'inputs': [], | |
24 'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ], | |
25 'action': [ | |
26 'bash', '-c', | |
27 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_mai
n.c' | |
28 ], | |
29 }, | |
30 ], | |
31 }, | |
32 ], | |
33 }, | |
34 ], | |
35 ['OS=="mac" or OS=="win"', { | |
36 'targets': [ | |
37 { | |
38 # GN version: //chrome:chrome_dll | |
39 'target_name': 'chrome_dll', | |
40 'type': 'none', | |
41 'dependencies': [ | |
42 'chrome_main_dll', | |
43 ], | |
44 'conditions': [ | |
45 ['OS=="mac" and component=="shared_library"', { | |
46 'type': 'shared_library', | |
47 'includes': [ 'chrome_dll_bundle.gypi' ], | |
48 'xcode_settings': { | |
49 'OTHER_LDFLAGS': [ | |
50 '-Wl,-reexport_library,<(PRODUCT_DIR)/libchrome_main_dll.dylib
', | |
51 ], | |
52 }, | |
53 }], # OS=="mac" | |
54 ['chrome_multiple_dll==1', { | |
55 'dependencies': [ | |
56 'chrome_child_dll', | |
57 ], | |
58 }], | |
59 ['incremental_chrome_dll==1', { | |
60 # Linking to a different directory and then hardlinking back | |
61 # to OutDir is a workaround to avoid having the .ilk for | |
62 # chrome.exe and chrome.dll conflicting. See crbug.com/92528 | |
63 # for more information. Done on the dll instead of the exe so | |
64 # that people launching from VS don't need to modify | |
65 # $(TargetPath) for the exe. | |
66 'actions': [ | |
67 { | |
68 'action_name': 'hardlink_to_output', | |
69 'inputs': [ | |
70 '$(OutDir)\\initial\\chrome.dll', | |
71 ], | |
72 'outputs': [ | |
73 '$(OutDir)\\chrome.dll', | |
74 ], | |
75 'action': ['tools\\build\\win\\hardlink_failsafe.bat', | |
76 '$(OutDir)\\initial\\chrome.dll', | |
77 '$(OutDir)\\chrome.dll'], | |
78 }, | |
79 ], | |
80 'conditions': [ | |
81 # Only hardlink pdb if we're generating debug info. | |
82 ['fastbuild==0 or win_z7!=0', { | |
83 'actions': [ | |
84 { | |
85 'action_name': 'hardlink_pdb_to_output', | |
86 'inputs': [ | |
87 # Not the pdb, since gyp doesn't know about it | |
88 '$(OutDir)\\initial\\chrome.dll', | |
89 ], | |
90 'outputs': [ | |
91 '$(OutDir)\\chrome.dll.pdb', | |
92 ], | |
93 'action': ['tools\\build\\win\\hardlink_failsafe.bat', | |
94 '$(OutDir)\\initial\\chrome.dll.pdb', | |
95 '$(OutDir)\\chrome.dll.pdb'], | |
96 } | |
97 ] | |
98 }] | |
99 ], | |
100 }], | |
101 ] | |
102 }, | |
103 { | |
104 # GN version: //chrome:main_dll | |
105 'target_name': 'chrome_main_dll', | |
106 'type': 'shared_library', | |
107 'variables': { | |
108 'enable_wexit_time_destructors': 1, | |
109 }, | |
110 'sources': [ | |
111 '../base/win/dllmain.cc', | |
112 'app/chrome_command_ids.h', | |
113 'app/chrome_dll_resource.h', | |
114 'app/chrome_main.cc', | |
115 'app/chrome_main_delegate.cc', | |
116 'app/chrome_main_delegate.h', | |
117 'app/chrome_main_mac.h', | |
118 'app/chrome_main_mac.mm', | |
119 ], | |
120 'dependencies': [ | |
121 '<@(chromium_browser_dependencies)', | |
122 'chrome_features.gyp:chrome_common_features', | |
123 'policy_path_parser', | |
124 '../content/content.gyp:content_app_browser', | |
125 ], | |
126 'conditions': [ | |
127 ['OS=="win"', { | |
128 'dependencies': [ | |
129 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf', | |
130 '<(DEPTH)/chrome/chrome.gyp:install_static_util', | |
131 '<(DEPTH)/components/components.gyp:policy', | |
132 ], | |
133 }], | |
134 ['use_aura==1', { | |
135 'dependencies': [ | |
136 '../ui/compositor/compositor.gyp:compositor', | |
137 ], | |
138 }], | |
139 ['OS=="win"', { | |
140 'product_name': 'chrome', | |
141 'dependencies': [ | |
142 # On Windows, link the dependencies (libraries) that make | |
143 # up actual Chromium functionality into this .dll. | |
144 'chrome_version_resources', | |
145 '../base/trace_event/etw_manifest/etw_manifest.gyp:etw_manifest'
, | |
146 '../chrome/chrome_resources.gyp:chrome_unscaled_resources', | |
147 '../content/app/resources/content_resources.gyp:content_resource
s', | |
148 '../crypto/crypto.gyp:crypto', | |
149 '../net/net.gyp:net_resources', | |
150 '../ui/views/views.gyp:views', | |
151 ], | |
152 'sources': [ | |
153 'app/chrome_dll.rc', | |
154 | |
155 # ETW Manifest. | |
156 '<(SHARED_INTERMEDIATE_DIR)/base/trace_event/etw_manifest/chrome
_events_win.rc', | |
157 | |
158 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc
', | |
159 | |
160 # Cursors. | |
161 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.r
c', | |
162 ], | |
163 'include_dirs': [ | |
164 '<(DEPTH)/third_party/wtl/include', | |
165 ], | |
166 'configurations': { | |
167 'Debug_Base': { | |
168 'msvs_settings': { | |
169 'VCLinkerTool': { | |
170 'LinkIncremental': '<(msvs_large_module_debug_link_mode)', | |
171 }, | |
172 }, | |
173 }, | |
174 }, | |
175 'msvs_settings': { | |
176 'VCLinkerTool': { | |
177 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency). | |
178 'SubSystem': '2', | |
179 'conditions': [ | |
180 ['incremental_chrome_dll==1', { | |
181 'OutputFile': '$(OutDir)\\initial\\chrome.dll', | |
182 'UseLibraryDependencyInputs': "true", | |
183 }], | |
184 ['target_arch=="ia32"', { | |
185 # Don't set an x64 base address (to avoid breaking HE-ASLR
). | |
186 'BaseAddress': '0x01c30000', | |
187 }], | |
188 ], | |
189 'DelayLoadDLLs': [ | |
190 'comdlg32.dll', | |
191 'crypt32.dll', | |
192 'cryptui.dll', | |
193 'dhcpcsvc.dll', | |
194 'imagehlp.dll', | |
195 'imm32.dll', | |
196 'iphlpapi.dll', | |
197 'setupapi.dll', | |
198 'urlmon.dll', | |
199 'winhttp.dll', | |
200 'wininet.dll', | |
201 'winspool.drv', | |
202 'ws2_32.dll', | |
203 'wsock32.dll', | |
204 ], | |
205 }, | |
206 'VCManifestTool': { | |
207 'AdditionalManifestFiles': [ | |
208 '$(ProjectDir)\\app\\chrome.dll.manifest', | |
209 ], | |
210 }, | |
211 }, | |
212 'conditions': [ | |
213 ['enable_basic_printing==1 or enable_print_preview==1', { | |
214 'dependencies': [ | |
215 '../printing/printing.gyp:printing', | |
216 ], | |
217 }], | |
218 ] | |
219 }], | |
220 ['chrome_multiple_dll==1', { | |
221 'defines': [ | |
222 'CHROME_MULTIPLE_DLL_BROWSER', | |
223 ], | |
224 }, { | |
225 'dependencies': [ | |
226 '<@(chromium_child_dependencies)', | |
227 '../content/content.gyp:content_app_both', | |
228 ], | |
229 'dependencies!': [ | |
230 '../content/content.gyp:content_app_browser', | |
231 ], | |
232 }], | |
233 ['chrome_multiple_dll==0 and enable_plugins==1', { | |
234 'dependencies': [ | |
235 '../pdf/pdf.gyp:pdf', | |
236 ], | |
237 }], | |
238 ['OS=="mac" and component!="shared_library"', { | |
239 'includes': [ 'chrome_dll_bundle.gypi' ], | |
240 }], | |
241 ['OS=="mac" and component=="shared_library"', { | |
242 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], }, | |
243 }], | |
244 ['OS=="mac"', { | |
245 'dependencies': [ | |
246 '../components/components.gyp:crash_component', | |
247 '../components/components.gyp:policy', | |
248 '../third_party/crashpad/crashpad/handler/handler.gyp:crashpad_h
andler', | |
249 ], | |
250 'sources': [ | |
251 'app/chrome_crash_reporter_client.cc', | |
252 'app/chrome_crash_reporter_client.h', | |
253 'app/chrome_crash_reporter_client_mac.mm', | |
254 ], | |
255 'xcode_settings': { | |
256 # Define the order of symbols within the framework. This | |
257 # sets -order_file. | |
258 'ORDER_FILE': 'app/framework.order', | |
259 }, | |
260 'include_dirs': [ | |
261 '<(grit_out_dir)', | |
262 ], | |
263 }], | |
264 # This step currently fails when using LTO. TODO(pcc): Re-enable. | |
265 ['OS=="mac" and use_lto==0 and component=="static_library" and asan=
=0', { | |
266 'postbuilds': [ | |
267 { | |
268 # This step causes an error to be raised if the .order file | |
269 # does not account for all global text symbols. It | |
270 # validates the completeness of the .order file. | |
271 'postbuild_name': 'Verify global text symbol order', | |
272 'variables': { | |
273 'verify_order_path': 'tools/build/mac/verify_order', | |
274 }, | |
275 'action': [ | |
276 '<(verify_order_path)', | |
277 '_ChromeMain', | |
278 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}', | |
279 ], | |
280 }, | |
281 ], | |
282 }], # OS=="mac" | |
283 ], # conditions | |
284 }, # target chrome_main_dll | |
285 ], # targets | |
286 }], # OS=="mac" or OS=="win" | |
287 ['chrome_multiple_dll', { | |
288 'targets': [ | |
289 { | |
290 # GN version: //chrome:chrome_child | |
291 'target_name': 'chrome_child_dll', | |
292 'type': 'shared_library', | |
293 'product_name': 'chrome_child', | |
294 'variables': { | |
295 'enable_wexit_time_destructors': 1, | |
296 }, | |
297 'dependencies': [ | |
298 '<@(chromium_child_dependencies)', | |
299 '../components/components.gyp:browser_watcher_client', | |
300 '../content/content.gyp:content_app_child', | |
301 '../third_party/kasko/kasko.gyp:kasko', | |
302 'chrome_features.gyp:chrome_common_features', | |
303 'chrome_version_resources', | |
304 'policy_path_parser', | |
305 ], | |
306 'defines': [ | |
307 'CHROME_MULTIPLE_DLL_CHILD', | |
308 ], | |
309 'sources': [ | |
310 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc', | |
311 'app/chrome_main.cc', | |
312 'app/chrome_main_delegate.cc', | |
313 'app/chrome_main_delegate.h', | |
314 ], | |
315 'conditions': [ | |
316 ['OS=="win"', { | |
317 'dependencies': [ | |
318 '<(DEPTH)/chrome/chrome.gyp:install_static_util', | |
319 '<(DEPTH)/components/components.gyp:policy', | |
320 ], | |
321 'conditions': [ | |
322 ['chrome_pgo_phase!=0', { | |
323 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO | |
324 # builds. Probably anything that this would catch that | |
325 # wouldn't be caught in a normal build isn't going to | |
326 # actually be a bug, so the incremental value of C4702 for | |
327 # PGO builds is likely very small. | |
328 'msvs_disabled_warnings': [ | |
329 4702 | |
330 ], | |
331 'msvs_settings': { | |
332 'VCCLCompilerTool': { | |
333 # This implies link time code generation. | |
334 'WholeProgramOptimization': 'true', | |
335 }, | |
336 }, | |
337 }], | |
338 ['chrome_pgo_phase==1', { | |
339 'msvs_settings': { | |
340 'VCLinkerTool': { | |
341 'LinkTimeCodeGeneration': '2', | |
342 'AdditionalOptions': [ | |
343 '/PogoSafeMode', | |
344 ], | |
345 }, | |
346 }, | |
347 }], | |
348 ['chrome_pgo_phase==2', { | |
349 'msvs_settings': { | |
350 'VCLinkerTool': { | |
351 'LinkTimeCodeGeneration': '3', | |
352 }, | |
353 }, | |
354 }], | |
355 ] | |
356 }], | |
357 ['enable_plugins==1', { | |
358 'dependencies': [ | |
359 '../pdf/pdf.gyp:pdf', | |
360 ], | |
361 }], | |
362 ], | |
363 }, # target chrome_child_dll | |
364 ], | |
365 }], | |
366 ], | |
367 } | |
OLD | NEW |