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

Unified Diff: tools/clang/scripts/update.py

Issue 524623003: Clang/Windows update script: copy the dynamic ASan RTL if present (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.py
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 033aca1826e4006f3f6d6c9cac61525d8e7a6ee1..6aaf1458f3815304fd963bce71617d42ca15acb6 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -132,6 +132,16 @@ def GetVSVersion():
return vs_version
+def CopyDirectoryContents(src, dst, filename_filter=None):
hans 2014/08/29 16:31:06 Maybe define this with CopyFile above, and give it
+ if not os.path.exists(dst):
+ os.makedirs(dst)
+ for root, _, files in os.walk(src):
+ for f in files:
+ if filename_filter and not re.match(filename_filter, f):
+ continue
+ CopyFile(os.path.join(root, f), dst)
+
+
def UpdateClang():
print 'Updating Clang to %s...' % (LLVM_WIN_REVISION)
if LLVM_WIN_REVISION != 'HEAD' and ReadStampFile() == LLVM_WIN_REVISION:
@@ -167,18 +177,18 @@ def UpdateClang():
'-DLLVM_ENABLE_ASSERTIONS=ON', LLVM_DIR])
RunCommand(GetVSVersion().SetupScript('x86') + ['&&', 'ninja', 'compiler-rt'])
+ asan_rt_bin_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'bin')
+ asan_rt_bin_dst_dir = os.path.join(LLVM_BUILD_DIR, 'bin')
+ CopyDirectoryContents(asan_rt_bin_src_dir, asan_rt_bin_dst_dir,
+ r'^.*-i386\.dll$')
+
# TODO(hans): Make this (and the .gypi file) version number independent.
asan_rt_lib_src_dir = os.path.join(COMPILER_RT_BUILD_DIR, 'lib', 'clang',
'3.6.0', 'lib', 'windows')
asan_rt_lib_dst_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang',
'3.6.0', 'lib', 'windows')
-
- if not os.path.exists(asan_rt_lib_dst_dir):
- os.makedirs(asan_rt_lib_dst_dir)
- for root, _, files in os.walk(asan_rt_lib_src_dir):
- for f in files:
- if re.match(r'^.*-i386\.lib$', f):
- CopyFile(os.path.join(root, f), asan_rt_lib_dst_dir)
+ CopyDirectoryContents(asan_rt_lib_src_dir, asan_rt_lib_dst_dir,
+ r'^.*-i386\.lib$')
CopyFile(os.path.join(asan_rt_lib_src_dir, '..', '..', 'asan_blacklist.txt'),
os.path.join(asan_rt_lib_dst_dir, '..', '..'))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698