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.
6 ['OS=="mac" or OS=="win"', {
9 'target_name': 'chrome_dll',
15 ['OS=="mac" and component=="shared_library"', {
16 'type': 'shared_library',
17 'includes': [ 'chrome_dll_bundle.gypi' ],
20 '-Wl,-reexport_library,<(PRODUCT_DIR)/libchrome_main_dll.dylib',
24 ['chrome_multiple_dll==1', {
29 ['incremental_chrome_dll==1', {
30 # Linking to a different directory and then hardlinking back
31 # to OutDir is a workaround to avoid having the .ilk for
32 # chrome.exe and chrome.dll conflicting. See crbug.com/92528
33 # for more information. Done on the dll instead of the exe so
34 # that people launching from VS don't need to modify
35 # $(TargetPath) for the exe.
38 'action_name': 'hardlink_to_output',
40 '$(OutDir)\\initial\\chrome.dll',
43 '$(OutDir)\\chrome.dll',
45 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
46 '$(OutDir)\\initial\\chrome.dll',
47 '$(OutDir)\\chrome.dll'],
51 # Only hardlink pdb if we're generating debug info.
52 ['fastbuild==0 or win_z7!=0', {
55 'action_name': 'hardlink_pdb_to_output',
57 # Not the pdb, since gyp doesn't know about it
58 '$(OutDir)\\initial\\chrome.dll',
61 '$(OutDir)\\chrome.dll.pdb',
63 'action': ['tools\\build\\win\\hardlink_failsafe.bat',
64 '$(OutDir)\\initial\\chrome.dll.pdb',
65 '$(OutDir)\\chrome.dll.pdb'],
74 # GN version: //chrome:main_dll
75 'target_name': 'chrome_main_dll',
76 'type': 'shared_library',
78 'enable_wexit_time_destructors': 1,
81 'app/chrome_command_ids.h',
82 'app/chrome_dll_resource.h',
84 'app/chrome_main_delegate.cc',
85 'app/chrome_main_delegate.h',
86 'app/chrome_main_mac.mm',
87 'app/chrome_main_mac.h',
88 'app/close_handle_hook_win.cc',
89 'app/close_handle_hook_win.h',
90 'app/delay_load_hook_win.cc',
91 'app/delay_load_hook_win.h',
92 '../base/win/dllmain.cc',
95 '<@(chromium_browser_dependencies)',
96 '../content/content.gyp:content_app_browser',
101 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
104 ['OS=="win" and configuration_policy==1', {
106 '<(DEPTH)/components/components.gyp:policy',
111 '../ui/compositor/compositor.gyp:compositor',
114 ['OS=="win" and target_arch=="ia32"', {
115 # Add a dependency to custom import library for user32 delay
116 # imports only in x86 builds.
118 'chrome_user32_delay_imports',
122 'product_name': 'chrome',
124 # On Windows, link the dependencies (libraries) that make
125 # up actual Chromium functionality into this .dll.
126 'chrome_version_resources',
127 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
128 '../content/app/resources/content_resources.gyp:content_resources',
129 '../crypto/crypto.gyp:crypto',
130 '../net/net.gyp:net_resources',
131 '../ui/views/views.gyp:views',
136 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
139 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_unscaled_resources.rc',
142 '<(DEPTH)/third_party/wtl/include',
148 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
155 'ImportLibrary': '$(OutDir)\\lib\\chrome_dll.lib',
156 # Set /SUBSYSTEM:WINDOWS for chrome.dll (for consistency).
159 ['incremental_chrome_dll==1', {
160 'OutputFile': '$(OutDir)\\initial\\chrome.dll',
161 'UseLibraryDependencyInputs': "true",
163 ['target_arch=="ia32"', {
164 # Don't set an x64 base address (to avoid breaking HE-ASLR).
165 'BaseAddress': '0x01c30000',
166 # Link against the XP-constrained user32 import library
167 # instead of the platform-SDK provided one to avoid
168 # inadvertently taking dependencies on post-XP user32
170 'AdditionalDependencies!': [
173 'IgnoreDefaultLibraryNames': [
176 # Remove user32 delay load for chrome.dll.
180 'AdditionalDependencies': [
186 'AdditionalLibraryDirectories': [
187 '<(DEPTH)/build/win/importlibs/x86',
189 'ForceSymbolReferences': [
190 # Force the inclusion of the delay load hook in this
192 '_ChromeDelayLoadHook@8',
214 'AdditionalManifestFiles': [
215 '$(ProjectDir)\\app\\chrome.dll.manifest',
220 ['win_use_allocator_shim==1', {
222 '<(allocator_target)',
225 ['enable_printing!=0', {
227 '../printing/printing.gyp:printing',
230 ['chrome_pgo_phase==1', {
233 'LinkTimeCodeGeneration': '2',
237 ['chrome_pgo_phase==2', {
240 'LinkTimeCodeGeneration': '3',
246 ['chrome_multiple_dll==1', {
248 'CHROME_MULTIPLE_DLL_BROWSER',
252 '<@(chromium_child_dependencies)',
253 '../content/content.gyp:content_app_both',
256 '../content/content.gyp:content_app_browser',
259 ['cld_version==0 or cld_version==1', {
261 '../third_party/cld/cld.gyp:cld',
264 ['cld_version==0 or cld_version==2', {
266 '../third_party/cld_2/cld_2.gyp:cld_2',
269 ['OS=="mac" and component!="shared_library"', {
270 'includes': [ 'chrome_dll_bundle.gypi' ],
272 ['OS=="mac" and component=="shared_library"', {
273 'xcode_settings': { 'OTHER_LDFLAGS': [ '-Wl,-ObjC' ], },
277 # Define the order of symbols within the framework. This
279 'ORDER_FILE': 'app/framework.order',
282 '../pdf/pdf.gyp:pdf',
289 # This step causes an error to be raised if the .order file
290 # does not account for all global text symbols. It
291 # validates the completeness of the .order file.
292 'postbuild_name': 'Verify global text symbol order',
294 'verify_order_path': 'tools/build/mac/verify_order',
297 '<(verify_order_path)',
299 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}',
304 ['mac_breakpad_compiled_in==1', {
306 '../breakpad/breakpad.gyp:breakpad',
307 '../components/components.gyp:crash_component',
308 '../components/components.gyp:policy',
311 'app/chrome_crash_reporter_client.cc',
312 'app/chrome_crash_reporter_client.h',
313 'app/chrome_crash_reporter_client_mac.mm',
315 }, { # else: mac_breakpad_compiled_in!=1
316 # No Breakpad, put in the stubs.
318 '../components/components.gyp:breakpad_stubs',
320 }], # mac_breakpad_compiled_in
324 }, # target chrome_main_dll
326 }], # OS=="mac" or OS=="win"
327 ['chrome_multiple_dll', {
330 'target_name': 'chrome_child_dll',
331 'type': 'shared_library',
332 'product_name': 'chrome_child',
334 'enable_wexit_time_destructors': 1,
337 '<@(chromium_child_dependencies)',
338 '../content/content.gyp:content_app_child',
339 'chrome_version_resources',
340 'policy_path_parser',
343 'CHROME_MULTIPLE_DLL_CHILD',
346 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
347 'app/chrome_main.cc',
348 'app/chrome_main_delegate.cc',
349 'app/chrome_main_delegate.h',
350 'app/close_handle_hook_win.cc',
351 'app/close_handle_hook_win.h',
356 '<(DEPTH)/chrome_elf/chrome_elf.gyp:chrome_elf',
359 ['chrome_pgo_phase==1', {
362 'LinkTimeCodeGeneration': '2',
366 ['chrome_pgo_phase==2', {
369 'LinkTimeCodeGeneration': '3',
376 }, # target chrome_child_dll