Commit 366f0dac authored by Eike Ziller's avatar Eike Ziller
Browse files

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: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 2205051e
......@@ -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')
......
......@@ -61,8 +61,12 @@ if [ $LLVM_INSTALL_DIR ]; then
# use recursive copy to make it copy symlinks as symlinks
cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang.*dylib "$1/Contents/Frameworks/" || exit 1
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$1/Contents/Resources/cplusplus/" || exit 1
cp -Rf "$LLVM_INSTALL_DIR"/bin/clang* "$1/Contents/Resources/" || exit 1
rm "$1/Contents/Resources/clang-check"
clangsource="$LLVM_INSTALL_DIR"/bin/clang
clanglinktarget="$(readlink "$clangsource")"
cp -Rf "$clangsource" "$1/Contents/Resources/" || exit 1
if [ $clanglinktarget ]; then
cp -Rf "$(dirname "$clangsource")/$clanglinktarget" "$1/Contents/Resources/$clanglinktarget" || exit 1
fi
fi
_CLANG_CODEMODEL_LIB="$1/Contents/PlugIns/libClangCodeModel_debug.dylib"
if [ ! -f "$_CLANG_CODEMODEL_LIB" ]; then
......
Markdown is supported
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