summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-07-10 10:18:20 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-07-10 09:03:10 +0000
commit366f0dacdceb8521214445ded0e1e2e83cc5ed5e (patch)
treee9c5fa40b4009e7eb934b2b03d57d43aa5bdb840 /scripts
parent2205051eaca2784b3da33bb71bb99536493f4041 (diff)
downloadqt-creator-366f0dacdceb8521214445ded0e1e2e83cc5ed5e.tar.gz
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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deployqt.py15
-rwxr-xr-xscripts/deployqtHelper_mac.sh8
2 files changed, 16 insertions, 7 deletions
diff --git a/scripts/deployqt.py b/scripts/deployqt.py
index 611c212a18..e1630503da 100755
--- a/scripts/deployqt.py
+++ b/scripts/deployqt.py
@@ -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')
diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh
index 78c34ec91f..be7929a5ff 100755
--- a/scripts/deployqtHelper_mac.sh
+++ b/scripts/deployqtHelper_mac.sh
@@ -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