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

Unified Diff: build/vs_toolchain.py

Issue 1890053004: Stop gyp_chromium prior to mass DLL copies on error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unecessary copies Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/gyp_chromium.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/vs_toolchain.py
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
index 12e86546870258eb3b366c9db43a3938e34512e0..1012216346806a9262ae7df3bdd53ed26abbdf13 100755
--- a/build/vs_toolchain.py
+++ b/build/vs_toolchain.py
@@ -153,12 +153,14 @@ def _VersionNumber():
def _CopyRuntimeImpl(target, source, verbose=True):
- """Copy |source| to |target| if it doesn't already exist or if it
- needs to be updated.
+ """Copy |source| to |target| if it doesn't already exist or if it needs to be
+ updated (comparing last modified time as an approximate float match as for
+ some reason the values tend to differ by ~1e-07 despite being copies of the
+ same file... https://crbug.com/603603).
"""
if (os.path.isdir(os.path.dirname(target)) and
(not os.path.isfile(target) or
- os.stat(target).st_mtime != os.stat(source).st_mtime)):
+ abs(os.stat(target).st_mtime - os.stat(source).st_mtime) >= 0.01)):
scottmg 2016/04/18 16:48:39 Gah! Why the heck is mtime a float anyway :/
gab 2016/04/18 16:58:51 I know, right..! Casting to int() and doing strict
brucedawson 2016/04/18 18:25:17 WTF? There's something weird going on. When I run:
if verbose:
print 'Copying %s to %s...' % (source, target)
if os.path.exists(target):
@@ -185,7 +187,6 @@ def _CopyRuntime2015(target_dir, source_dir, dll_pattern, suffix):
source = os.path.join(source_dir, dll)
_CopyRuntimeImpl(target, source)
ucrt_src_dir = os.path.join(source_dir, 'api-ms-win-*.dll')
- print 'Copying %s to %s...' % (ucrt_src_dir, target_dir)
for ucrt_src_file in glob.glob(ucrt_src_dir):
file_part = os.path.basename(ucrt_src_file)
ucrt_dst_file = os.path.join(target_dir, file_part)
« no previous file with comments | « build/gyp_chromium.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698