summaryrefslogtreecommitdiffstats
path: root/chrome/chrome_dll.gypi
diff options
context:
space:
mode:
authorsiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:17:58 +0000
committersiggi@chromium.org <siggi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:17:58 +0000
commitb26ac3b182b8c63192ad1f8e221ceac3fe5927be (patch)
treefaed9cd708aa240b55bd3d8d56b8f30f519d39e9 /chrome/chrome_dll.gypi
parent3209161d2f32bf14d594e455402be6d5ca09580b (diff)
downloadchromium_src-b26ac3b182b8c63192ad1f8e221ceac3fe5927be.zip
chromium_src-b26ac3b182b8c63192ad1f8e221ceac3fe5927be.tar.gz
chromium_src-b26ac3b182b8c63192ad1f8e221ceac3fe5927be.tar.bz2
Check in a custom-built import library for user32 exports up to Windows XP SP2/SP3, which is used by chrome.dll in preference to the Platform SDK's user32.lib import library.
Custom build an import library for Chrome's post-WinXP imports, that binds to a fictional "user32-delay.dll". Implement and test a delay load hook that diverts dynamic loading of any dll "foo-delay.dll" to "foo.dll". R=cpu@chromium.org BUG=176040 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191173 Review URL: https://chromiumcodereview.appspot.com/12295040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191418 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/chrome_dll.gypi')
-rw-r--r--chrome/chrome_dll.gypi39
1 files changed, 39 insertions, 0 deletions
diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi
index 8f5aab4..3d4119a 100644
--- a/chrome/chrome_dll.gypi
+++ b/chrome/chrome_dll.gypi
@@ -88,6 +88,13 @@
'<(SHARED_INTERMEDIATE_DIR)/ash/ash_resources/ash_wallpaper_resources.rc',
],
}],
+ ['OS=="win" and target_arch=="ia32"', {
+ # Add a dependency to custom import library for user32 delay
+ # imports only in x86 builds.
+ 'dependencies': [
+ 'chrome_user32_delay_imports',
+ ],
+ },],
['OS=="win"', {
'product_name': 'chrome',
'dependencies': [
@@ -112,6 +119,8 @@
'app/chrome_main.cc',
'app/chrome_main_delegate.cc',
'app/chrome_main_delegate.h',
+ 'app/delay_load_hook_win.cc',
+ 'app/delay_load_hook_win.h',
'<(SHARED_INTERMEDIATE_DIR)/chrome_version/chrome_dll_version.rc',
'../base/win/dllmain.cc',
@@ -169,6 +178,36 @@
'OutputFile': '$(OutDir)\\initial\\chrome.dll',
'UseLibraryDependencyInputs': "true",
}],
+ ['target_arch=="ia32"', {
+ # Link against the XP-constrained user32 import library
+ # instead of the platform-SDK provided one to avoid
+ # inadvertently taking dependencies on post-XP user32
+ # exports.
+ 'AdditionalDependencies!': [
+ 'user32.lib',
+ ],
+ 'IgnoreDefaultLibraryNames': [
+ 'user32.lib',
+ ],
+ # Remove user32 delay load for chrome.dll.
+ 'DelayLoadDLLs!': [
+ 'user32.dll',
+ ],
+ 'AdditionalDependencies': [
+ 'user32.winxp.lib',
+ ],
+ 'DelayLoadDLLs': [
+ 'user32-delay.dll',
+ ],
+ 'AdditionalLibraryDirectories': [
+ '<(DEPTH)/build/win/importlibs/x86',
+ ],
+ 'ForceSymbolReferences': [
+ # Force the inclusion of the delay load hook in this
+ # binary.
+ '_ChromeDelayLoadHook@8',
+ ],
+ }],
],
'DelayLoadDLLs': [
'comdlg32.dll',