Commit d02e80b8 authored by Eike Ziller's avatar Eike Ziller
Browse files

Deploy clang binary for use by static analyzer

Change-Id: Ia0ad96e18b754e2ac20a6dddd461d4d24c1a0db4
Reviewed-by: default avatarEike Ziller <>
parent f6cc098e
......@@ -229,20 +229,28 @@ def copyPreservingLinks(source, destination):
shutil.copy(source, destination)
def copy_libclang(install_dir, llvm_install_dir):
libsources = []
libtarget = ""
# contains pairs of (source, target directory)
deployinfo = []
if sys.platform.startswith("win"):
libsources = [os.path.join(llvm_install_dir, 'bin', 'libclang.dll')]
libtarget = os.path.join(install_dir, 'bin')
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'libclang.dll'),
os.path.join(install_dir, 'bin')))
libsources = glob(os.path.join(llvm_install_dir, 'lib', '*'))
libtarget = os.path.join(install_dir, 'lib', 'qtcreator')
for libsource in libsources:
deployinfo.append((libsource, os.path.join(install_dir, 'lib', 'qtcreator')))
clangsources = glob(os.path.join(llvm_install_dir, 'bin', 'clang*'))
for clangsource in clangsources:
if not os.path.basename(clangsource).startswith('clang-check'):
deployinfo.append((clangsource, os.path.join(install_dir, 'bin')))
resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
resourcetarget = os.path.join(install_dir, 'share', 'qtcreator', 'cplusplus', 'clang')
print "copying libclang..."
for libsource in libsources:
print libsource, '->', libtarget
copyPreservingLinks(libsource, libtarget)
for source, target in deployinfo:
print source, '->', target
copyPreservingLinks(source, target)
print resourcesource, '->', resourcetarget
if (os.path.exists(resourcetarget)):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment