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

Side by Side Diff: chrome/chrome_dll.gypi

Issue 12210017: Start of build config for custom user32 import libs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement the delay load hook. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 'conditions': [ 5 'conditions': [
6 ['OS=="mac" or OS=="win"', { 6 ['OS=="mac" or OS=="win"', {
7 'targets': [ 7 'targets': [
8 { 8 {
9 'target_name': 'chrome_dll', 9 'target_name': 'chrome_dll',
10 'type': 'none', 10 'type': 'none',
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 ], 89 ],
90 }], 90 }],
91 ['OS=="win"', { 91 ['OS=="win"', {
92 'product_name': 'chrome', 92 'product_name': 'chrome',
93 'dependencies': [ 93 'dependencies': [
94 # On Windows, link the dependencies (libraries) that make 94 # On Windows, link the dependencies (libraries) that make
95 # up actual Chromium functionality into this .dll. 95 # up actual Chromium functionality into this .dll.
96 'chrome_dll_pdb_workaround', 96 'chrome_dll_pdb_workaround',
97 'chrome_resources.gyp:chrome_resources', 97 'chrome_resources.gyp:chrome_resources',
98 'chrome_version_resources', 98 'chrome_version_resources',
99 'user32_import_libs',
99 '../chrome/chrome_resources.gyp:chrome_unscaled_resources', 100 '../chrome/chrome_resources.gyp:chrome_unscaled_resources',
100 '../content/content.gyp:content_worker', 101 '../content/content.gyp:content_worker',
101 '../crypto/crypto.gyp:crypto', 102 '../crypto/crypto.gyp:crypto',
102 '../printing/printing.gyp:printing', 103 '../printing/printing.gyp:printing',
103 '../net/net.gyp:net_resources', 104 '../net/net.gyp:net_resources',
104 '../third_party/cld/cld.gyp:cld', 105 '../third_party/cld/cld.gyp:cld',
105 '../ui/views/views.gyp:views', 106 '../ui/views/views.gyp:views',
106 '../webkit/support/webkit_support.gyp:webkit_resources', 107 '../webkit/support/webkit_support.gyp:webkit_resources',
107 ], 108 ],
108 'sources': [ 109 'sources': [
109 'app/chrome_command_ids.h', 110 'app/chrome_command_ids.h',
110 'app/chrome_dll.rc', 111 'app/chrome_dll.rc',
111 'app/chrome_dll_resource.h', 112 'app/chrome_dll_resource.h',
112 'app/chrome_main.cc', 113 'app/chrome_main.cc',
113 'app/chrome_main_delegate.cc', 114 'app/chrome_main_delegate.cc',
114 'app/chrome_main_delegate.h', 115 'app/chrome_main_delegate.h',
116 'app/delay_load_hook.cc',
117 'app/delay_load_hook.h',
115 118
116 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc ', 119 '<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc ',
117 '../base/win/dllmain.cc', 120 '../base/win/dllmain.cc',
118 121
119 '../webkit/glue/resources/aliasb.cur', 122 '../webkit/glue/resources/aliasb.cur',
120 '../webkit/glue/resources/cell.cur', 123 '../webkit/glue/resources/cell.cur',
121 '../webkit/glue/resources/col_resize.cur', 124 '../webkit/glue/resources/col_resize.cur',
122 '../webkit/glue/resources/copy.cur', 125 '../webkit/glue/resources/copy.cur',
123 '../webkit/glue/resources/none.cur', 126 '../webkit/glue/resources/none.cur',
124 '../webkit/glue/resources/row_resize.cur', 127 '../webkit/glue/resources/row_resize.cur',
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 # This *in the compile phase* must match the pdb name that's 283 # This *in the compile phase* must match the pdb name that's
281 # output by the final link. See empty_pdb_workaround.cc for 284 # output by the final link. See empty_pdb_workaround.cc for
282 # more details. 285 # more details.
283 'DebugInformationFormat': '3', 286 'DebugInformationFormat': '3',
284 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb', 287 'ProgramDataBaseFileName': '<(PRODUCT_DIR)/chrome.dll.pdb',
285 }, 288 },
286 }, 289 },
287 }], 290 }],
288 ], 291 ],
289 }, 292 },
293 {
294 # This target builds import libraries for user32, to allow separating
295 # the few post Win-XP imports we use as delay imports, from the
296 # XP-level imports we bind explictly.
297 'target_name': 'user32_import_libs',
298 'type': 'none',
299 'sources': [
300 'imports/build_import_libraries.py',
301 'imports/user32.imports.json',
302 ],
303 'outputs': [
304 '<(PRODUCT_DIR)/lib/user32-imports.lib',
305 '<(PRODUCT_DIR)/lib/user32-delay.lib',
306 ],
307 'actions': [
308 {
309 'action_name': 'user32_imports',
310 'message': 'Building import libraries for user32.dll',
311 'inputs': [
312 'imports/user32.imports.json',
313 ],
314 'outputs': [
315 '<(PRODUCT_DIR)/lib/user32-imports.lib',
316 '<(PRODUCT_DIR)/lib/user32-delay.lib',
317 ],
318 'action': [
319 'python',
320 'imports/build_import_libraries.py',
321 '--verbose',
322 '<@(_inputs)',
323 '--output-dir', '<(PRODUCT_DIR)/lib/',
324 ],
325 'msvs_cygwin_shell': 0,
326 },
327 ],
328 # TODO(siggi): This should be happening only for release builds,
329 # how to wrangle that? DO NOT SUBMIT.
330 'direct_dependent_settings': {
331 'msvs_settings': {
332 'VCLinkerTool': {
333 # Ignore the user32.dll import library.
334 'IgnoreDefaultLibraryNames': ['user32.lib'],
335 # Add our custom-made import libraries.
336 'AdditionalDependencies': [
337 '<(PRODUCT_DIR)/lib/user32-imports.lib',
338 '<(PRODUCT_DIR)/lib/user32-delay.lib',
339 ],
340 # Delay load only the latter of the import libs above.
341 'DelayLoadDLLs': [
342 'user32-delay.dll',
343 ],
344 # Make sure the delay load hook is linked into the image.
345 # This will ensure that the delay hook pointer is also linked
346 # from the corresponding .obj file.
347 'ForceSymbolReferences': [ 'ChromeDelayLoadHook' ],
348 },
349 },
350 },
351 },
290 ], 352 ],
291 }], 353 }],
292 ], 354 ],
293 } 355 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698