summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2022-06-27 15:26:03 +0200
committerCristian Adam <cristian.adam@qt.io>2022-06-27 15:40:18 +0000
commit22b8f3bdcd00de9cdee6a5fcc4da12b5d1293a47 (patch)
tree94d0aa21d314e19553bc2b7765f2224890b1d27f /scripts
parent2e85c489447a0ce0249eb54fea701fe27015a6af (diff)
downloadqt-creator-22b8f3bdcd00de9cdee6a5fcc4da12b5d1293a47.tar.gz
scripts: Deploy clang-format tool
The beautifier plugin can use the clang-format tool, which is statically build, and it's around 2-6 MB in size. Fixes: QTCREATORBUG-25600 Change-Id: I900f0dbfc2ba2773d3ad986c149adb41a4103e94 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/deployqt.py4
-rwxr-xr-xscripts/deployqtHelper_mac.sh2
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/deployqt.py b/scripts/deployqt.py
index f02f41652f..8ef5917a30 100755
--- a/scripts/deployqt.py
+++ b/scripts/deployqt.py
@@ -238,7 +238,7 @@ def deploy_clang(install_dir, llvm_install_dir, chrpath_bin):
clanglibdirtarget = os.path.join(install_dir, 'bin', 'clang', 'lib')
if not os.path.exists(clanglibdirtarget):
os.makedirs(clanglibdirtarget)
- for binary in ['clangd', 'clang-tidy', 'clazy-standalone']:
+ for binary in ['clangd', 'clang-tidy', 'clazy-standalone', 'clang-format']:
binary_filepath = os.path.join(llvm_install_dir, 'bin', binary + '.exe')
if os.path.exists(binary_filepath):
deployinfo.append((binary_filepath, clangbindirtarget))
@@ -248,7 +248,7 @@ def deploy_clang(install_dir, llvm_install_dir, chrpath_bin):
clangbinary_targetdir = os.path.join(install_dir, 'libexec', 'qtcreator', 'clang', 'bin')
if not os.path.exists(clangbinary_targetdir):
os.makedirs(clangbinary_targetdir)
- for binary in ['clangd', 'clang-tidy', 'clazy-standalone']:
+ for binary in ['clangd', 'clang-tidy', 'clazy-standalone', 'clang-format']:
binary_filepath = os.path.join(llvm_install_dir, 'bin', binary)
if os.path.exists(binary_filepath):
deployinfo.append((binary_filepath, clangbinary_targetdir))
diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh
index 487cdfda65..21da15c74e 100755
--- a/scripts/deployqtHelper_mac.sh
+++ b/scripts/deployqtHelper_mac.sh
@@ -123,6 +123,8 @@ if [ $LLVM_INSTALL_DIR ]; then
cp -Rf "$clangdsource" "$libexec_path/clang/bin/" || exit 1
clangtidysource="$LLVM_INSTALL_DIR"/bin/clang-tidy
cp -Rf "$clangtidysource" "$libexec_path/clang/bin/" || exit 1
+ clangformatsource="$LLVM_INSTALL_DIR"/bin/clang-format
+ cp -Rf "$clangformatsource" "$libexec_path/clang/bin/" || exit 1
clazysource="$LLVM_INSTALL_DIR"/bin/clazy-standalone
cp -Rf "$clazysource" "$libexec_path/clang/bin/" || exit 1
install_name_tool -add_rpath "@executable_path/../lib" "$libexec_path/clang/bin/clazy-standalone" 2> /dev/null