summaryrefslogtreecommitdiffstats
path: root/build/gyp_chromium
diff options
context:
space:
mode:
authorscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-22 05:19:48 +0000
committerscottmg@chromium.org <scottmg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-22 05:19:48 +0000
commita70cccddc03cbfbdf0a3acb726ad8df6410060e8 (patch)
treed008f05fa47ed4377cb696d8f6d891bdd2fe0328 /build/gyp_chromium
parentc18f4c0c7237cd69922313d85dabb2a952a7f498 (diff)
downloadchromium_src-a70cccddc03cbfbdf0a3acb726ad8df6410060e8.zip
chromium_src-a70cccddc03cbfbdf0a3acb726ad8df6410060e8.tar.gz
chromium_src-a70cccddc03cbfbdf0a3acb726ad8df6410060e8.tar.bz2
Fix and make smarter runtime dll copying
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@252751 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/gyp_chromium')
-rwxr-xr-xbuild/gyp_chromium19
1 files changed, 12 insertions, 7 deletions
diff --git a/build/gyp_chromium b/build/gyp_chromium
index a085374..63ac799 100755
--- a/build/gyp_chromium
+++ b/build/gyp_chromium
@@ -350,8 +350,6 @@ def CopyVsRuntimeDlls(output_dir, runtime_dirs):
"""
assert sys.platform.startswith(('win32', 'cygwin'))
- print 'Copying runtime DLLs:'
-
def copy_runtime(target_dir, source_dir, dll_pattern):
"""Copy both the msvcr and msvcp runtime DLLs, only if the target doesn't
exist, but the target directory does exist."""
@@ -361,10 +359,13 @@ def CopyVsRuntimeDlls(output_dir, runtime_dirs):
source = os.path.join(source_dir, dll)
# If gyp generated to that output dir, and the runtime isn't already
# there, then copy it over.
- print source, target, target_dir
- if os.path.isdir(target_dir) and not os.path.isfile(target):
- print ' copying', source, target
- shutil.copyfile(source, target)
+ if (os.path.isdir(target_dir) and
+ (not os.path.isfile(target) or
+ os.stat(target).st_mtime != os.stat(source).st_mtime)):
+ print 'Copying %s to %s...' % (source, target)
+ if os.path.exists(target):
+ os.unlink(target)
+ shutil.copy2(source, target)
x86, x64 = runtime_dirs
out_debug = os.path.join(output_dir, 'Debug')
@@ -480,6 +481,9 @@ if __name__ == '__main__':
version_is_pro = version[-1] != 'e'
win8sdk = toolchain_data['win8sdk']
wdk = toolchain_data['wdk']
+ # TODO(scottmg): The order unfortunately matters in these. They should be
+ # split into separate keys for x86 and x64. (See CopyVsRuntimeDlls call
+ # below). http://crbug.com/345992
vs2013_runtime_dll_dirs = toolchain_data['runtime_dirs']
os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain
@@ -538,7 +542,8 @@ if __name__ == '__main__':
[sys.executable, os.path.join(script_dir, 'landmines.py')])
if vs2013_runtime_dll_dirs:
+ x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
CopyVsRuntimeDlls(os.path.join(chrome_src, GetOutputDirectory()),
- vs2013_runtime_dll_dirs)
+ (x86_runtime, x64_runtime))
sys.exit(gyp_rc)