forked from qt-creator/qt-creator
Scripts: Do not deploy libclang anymore
Since libclang is no longer needed, we don't need to deploy the library anymore. Change-Id: Ia7bdb7e089ec95b8252efbfa1c607d03082a99e6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -227,7 +227,7 @@ def copyPreservingLinks(source, destination):
|
|||||||
else:
|
else:
|
||||||
shutil.copy(source, destination)
|
shutil.copy(source, destination)
|
||||||
|
|
||||||
def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
|
def deploy_clang(install_dir, llvm_install_dir, chrpath_bin):
|
||||||
# contains pairs of (source, target directory)
|
# contains pairs of (source, target directory)
|
||||||
deployinfo = []
|
deployinfo = []
|
||||||
resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
|
resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
|
||||||
@@ -238,18 +238,12 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
|
|||||||
clanglibdirtarget = os.path.join(install_dir, 'bin', 'clang', 'lib')
|
clanglibdirtarget = os.path.join(install_dir, 'bin', 'clang', 'lib')
|
||||||
if not os.path.exists(clanglibdirtarget):
|
if not os.path.exists(clanglibdirtarget):
|
||||||
os.makedirs(clanglibdirtarget)
|
os.makedirs(clanglibdirtarget)
|
||||||
deployinfo.append((os.path.join(llvm_install_dir, 'bin', 'libclang.dll'),
|
|
||||||
os.path.join(install_dir, 'bin')))
|
|
||||||
for binary in ['clang', 'clang-cl', 'clangd', 'clang-tidy', 'clazy-standalone']:
|
for binary in ['clang', 'clang-cl', 'clangd', 'clang-tidy', 'clazy-standalone']:
|
||||||
binary_filepath = os.path.join(llvm_install_dir, 'bin', binary + '.exe')
|
binary_filepath = os.path.join(llvm_install_dir, 'bin', binary + '.exe')
|
||||||
if os.path.exists(binary_filepath):
|
if os.path.exists(binary_filepath):
|
||||||
deployinfo.append((binary_filepath, clangbindirtarget))
|
deployinfo.append((binary_filepath, clangbindirtarget))
|
||||||
resourcetarget = os.path.join(clanglibdirtarget, 'clang')
|
resourcetarget = os.path.join(clanglibdirtarget, 'clang')
|
||||||
else:
|
else:
|
||||||
# libclang -> Qt Creator libraries
|
|
||||||
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')))
|
|
||||||
# clang binaries -> clang libexec
|
# clang binaries -> clang libexec
|
||||||
clangbinary_targetdir = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'bin')
|
clangbinary_targetdir = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'bin')
|
||||||
if not os.path.exists(clangbinary_targetdir):
|
if not os.path.exists(clangbinary_targetdir):
|
||||||
@@ -273,7 +267,7 @@ def deploy_libclang(install_dir, llvm_install_dir, chrpath_bin):
|
|||||||
deployinfo.append((lib, clanglibs_targetdir))
|
deployinfo.append((lib, clanglibs_targetdir))
|
||||||
resourcetarget = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'lib', 'clang')
|
resourcetarget = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'lib', 'clang')
|
||||||
|
|
||||||
print("copying libclang...")
|
print("copying clang...")
|
||||||
for source, target in deployinfo:
|
for source, target in deployinfo:
|
||||||
print(source, '->', target)
|
print(source, '->', target)
|
||||||
copyPreservingLinks(source, target)
|
copyPreservingLinks(source, target)
|
||||||
@@ -403,7 +397,7 @@ def main():
|
|||||||
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.lib, qt_install.plugins, qt_install.qml, plugins)
|
copy_qt_libs(qt_deploy_prefix, qt_install.bin, qt_install.lib, qt_install.plugins, qt_install.qml, plugins)
|
||||||
copy_translations(install_dir, qt_install.translations)
|
copy_translations(install_dir, qt_install.translations)
|
||||||
if args.llvm_path:
|
if args.llvm_path:
|
||||||
deploy_libclang(install_dir, args.llvm_path, chrpath_bin)
|
deploy_clang(install_dir, args.llvm_path, chrpath_bin)
|
||||||
|
|
||||||
if args.elfutils_path:
|
if args.elfutils_path:
|
||||||
deploy_elfutils(install_dir, chrpath_bin, args)
|
deploy_elfutils(install_dir, chrpath_bin, args)
|
||||||
|
@@ -109,15 +109,14 @@ if [ ! -f "$resource_path/translations/qt_de.qm" ]; then
|
|||||||
cp "$translation_src"/*.qm "$resource_path/translations/" || exit 1
|
cp "$translation_src"/*.qm "$resource_path/translations/" || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy libclang if needed
|
# copy clang if needed
|
||||||
if [ $LLVM_INSTALL_DIR ]; then
|
if [ $LLVM_INSTALL_DIR ]; then
|
||||||
if [ "$LLVM_INSTALL_DIR"/lib/libclang.dylib -nt "$app_path/Contents/PlugIns"/libclang.dylib ]; then
|
if [ "$LLVM_INSTALL_DIR"/lib/libclang-cpp.dylib -nt "$libexec_path"/clang/lib/libclang-cpp.dylib ]; then
|
||||||
echo "- Copying libclang"
|
echo "- Copying clang"
|
||||||
mkdir -p "$app_path/Contents/Frameworks" || exit 1
|
mkdir -p "$app_path/Contents/Frameworks" || exit 1
|
||||||
# use recursive copy to make it copy symlinks as symlinks
|
# use recursive copy to make it copy symlinks as symlinks
|
||||||
mkdir -p "$libexec_path/clang/bin"
|
mkdir -p "$libexec_path/clang/bin"
|
||||||
mkdir -p "$libexec_path/clang/lib"
|
mkdir -p "$libexec_path/clang/lib"
|
||||||
cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang.*dylib "$app_path/Contents/Frameworks/" || exit 1
|
|
||||||
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$libexec_path/clang/lib/" || exit 1
|
cp -Rf "$LLVM_INSTALL_DIR"/lib/clang "$libexec_path/clang/lib/" || exit 1
|
||||||
cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang-cpp.dylib "$libexec_path/clang/lib/" || exit 1
|
cp -Rf "$LLVM_INSTALL_DIR"/lib/libclang-cpp.dylib "$libexec_path/clang/lib/" || exit 1
|
||||||
cp -Rf "$LLVM_INSTALL_DIR"/lib/ClazyPlugin.dylib "$libexec_path/clang/lib/" || exit 1
|
cp -Rf "$LLVM_INSTALL_DIR"/lib/ClazyPlugin.dylib "$libexec_path/clang/lib/" || exit 1
|
||||||
|
Reference in New Issue
Block a user