Deploy only the clang binary and its link target

Instead of all clang* which is too much on Windows (because they are
copies instead of links), and we don't want clang-check on Linux and OS X
either anyhow

Change-Id: Ia08cf09efa5a23ec6b83bc5df18d09558810f72d
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-07-10 10:18:20 +02:00
parent 2205051eac
commit 366f0dacdc
2 changed files with 16 additions and 7 deletions

View File

@@ -234,15 +234,20 @@ def copy_libclang(install_dir, llvm_install_dir):
if sys.platform.startswith("win"):
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'libclang.dll'),
os.path.join(install_dir, 'bin')))
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'clang-cl.exe'),
os.path.join(install_dir, 'bin')))
else:
libsources = glob(os.path.join(llvm_install_dir, 'lib', 'libclang.so*'))
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')))
clangbinary = os.path.join(llvm_install_dir, 'bin', 'clang')
clangbinary_targetdir = os.path.join(install_dir, 'bin')
deployinfo.append((clangbinary, clangbinary_targetdir))
# copy link target if clang is actually a symlink
if os.path.islink(clangbinary):
linktarget = os.readlink(clangbinary)
deployinfo.append((os.path.join(os.path.dirname(clangbinary), linktarget),
os.path.join(clangbinary_targetdir, linktarget)))
resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
resourcetarget = os.path.join(install_dir, 'share', 'qtcreator', 'cplusplus', 'clang')