summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-qt/qt5/qt5-creator/0002-clangformat-Fix-build-with-LLVM-13.patch49
-rw-r--r--recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch32
-rw-r--r--recipes-qt/qt5/qt5-creator_git.bb6
3 files changed, 85 insertions, 2 deletions
diff --git a/recipes-qt/qt5/qt5-creator/0002-clangformat-Fix-build-with-LLVM-13.patch b/recipes-qt/qt5/qt5-creator/0002-clangformat-Fix-build-with-LLVM-13.patch
new file mode 100644
index 00000000..e03ef5b7
--- /dev/null
+++ b/recipes-qt/qt5/qt5-creator/0002-clangformat-Fix-build-with-LLVM-13.patch
@@ -0,0 +1,49 @@
1From 14eb5b382cabf90352634393c19bf87a4c15766a Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de>
3Date: Mon, 8 Mar 2021 21:56:06 +0100
4Subject: [PATCH] clangformat: Fix build with LLVM 13
5
6Change-Id: I5eaad17a6f240aa1e3f246492b69f093b4f59fee
7Reviewed-by: David Schulz <david.schulz@qt.io>
8
9Upstream-Status: Accepted [https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=14eb5b382cabf90352634393c19bf87a4c15766a]
10---
11 src/plugins/clangformat/clangformatbaseindenter.cpp | 4 ++++
12 src/plugins/clangformat/clangformatutils.cpp | 4 ++++
13 2 files changed, 8 insertions(+)
14
15diff --git a/src/plugins/clangformat/clangformatbaseindenter.cpp b/src/plugins/clangformat/clangformatbaseindenter.cpp
16index fb8e693809..6378b2af53 100644
17--- a/src/plugins/clangformat/clangformatbaseindenter.cpp
18+++ b/src/plugins/clangformat/clangformatbaseindenter.cpp
19@@ -42,7 +42,11 @@ void adjustFormatStyleForLineBreak(clang::format::FormatStyle &style,
20 ReplacementsToKeep replacementsToKeep)
21 {
22 style.MaxEmptyLinesToKeep = 100;
23+#if LLVM_VERSION_MAJOR >= 13
24+ style.SortIncludes = clang::format::FormatStyle::SI_Never;
25+#else
26 style.SortIncludes = false;
27+#endif
28 style.SortUsingDeclarations = false;
29
30 // This is a separate pass, don't do it unless it's the full formatting.
31diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
32index a249327d0e..770e75908c 100644
33--- a/src/plugins/clangformat/clangformatutils.cpp
34+++ b/src/plugins/clangformat/clangformatutils.cpp
35@@ -145,7 +145,11 @@ static clang::format::FormatStyle qtcStyle()
36 style.PenaltyReturnTypeOnItsOwnLine = 300;
37 style.PointerAlignment = FormatStyle::PAS_Right;
38 style.ReflowComments = false;
39+#ifdef LLVM_VERSION_MAJOR >= 13
40+ style.SortIncludes = FormatStyle::SI_CaseSensitive;
41+#else
42 style.SortIncludes = true;
43+#endif
44 style.SortUsingDeclarations = true;
45 style.SpaceAfterCStyleCast = true;
46 style.SpaceAfterTemplateKeyword = false;
47--
482.31.1
49
diff --git a/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch b/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch
new file mode 100644
index 00000000..33761797
--- /dev/null
+++ b/recipes-qt/qt5/qt5-creator/0003-clangformat-Fix-build-with-LLVM-13.patch
@@ -0,0 +1,32 @@
1From 55b91a76172a3235b4879daf0b675519d5b02db7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= <bjoern@hazardy.de>
3Date: Wed, 16 Jun 2021 20:59:29 +0200
4Subject: [PATCH] clangformat: Fix build with LLVM 13
5
6Change-Id: Ia9db10696fd129c8b989ecc4c9ecbb7f1f10e68c
7Reviewed-by: David Schulz <david.schulz@qt.io>
8
9Upstream-Status: Accepted [https://code.qt.io/cgit/qt-creator/qt-creator.git/commit/?id=55b91a76172a3235b4879daf0b675519d5b02db7]
10---
11 src/plugins/clangformat/clangformatutils.cpp | 4 ++++
12 1 file changed, 4 insertions(+)
13
14diff --git a/src/plugins/clangformat/clangformatutils.cpp b/src/plugins/clangformat/clangformatutils.cpp
15index 2f9a306b99..3905ae5f6a 100644
16--- a/src/plugins/clangformat/clangformatutils.cpp
17+++ b/src/plugins/clangformat/clangformatutils.cpp
18@@ -157,7 +157,11 @@ static clang::format::FormatStyle qtcStyle()
19 style.SpaceBeforeParens = FormatStyle::SBPO_ControlStatements;
20 style.SpaceInEmptyParentheses = false;
21 style.SpacesBeforeTrailingComments = 1;
22+#if LLVM_VERSION_MAJOR >= 13
23+ style.SpacesInAngles = FormatStyle::SIAS_Never;
24+#else
25 style.SpacesInAngles = false;
26+#endif
27 style.SpacesInContainerLiterals = false;
28 style.SpacesInCStyleCastParentheses = false;
29 style.SpacesInParentheses = false;
30--
312.31.1
32
diff --git a/recipes-qt/qt5/qt5-creator_git.bb b/recipes-qt/qt5/qt5-creator_git.bb
index 95873381..a83dab23 100644
--- a/recipes-qt/qt5/qt5-creator_git.bb
+++ b/recipes-qt/qt5/qt5-creator_git.bb
@@ -17,13 +17,15 @@ inherit qmake5 mime-xdg
17DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib" 17DEPENDS += "qtbase qtscript qtxmlpatterns qtx11extras qtdeclarative qttools qttools-native qtsvg chrpath-replacement-native zlib"
18DEPENDS_append_libc-musl = " libexecinfo" 18DEPENDS_append_libc-musl = " libexecinfo"
19 19
20SRCREV = "978f6caf1e18ad0b0415fde60a8c130448969c6d" 20SRCREV = "94d227cd434d09717de95529e5210ec530451e1c"
21PV = "4.15.0+git${SRCPV}" 21PV = "4.15.2+git${SRCPV}"
22# Patches from https://github.com/meta-qt5/qtcreator/commits/b4.9.2 22# Patches from https://github.com/meta-qt5/qtcreator/commits/b4.9.2
23# 4.9.2.meta-qt5.1 23# 4.9.2.meta-qt5.1
24SRC_URI = " \ 24SRC_URI = " \
25 git://code.qt.io/qt-creator/qt-creator.git;branch=4.15 \ 25 git://code.qt.io/qt-creator/qt-creator.git;branch=4.15 \
26 file://0001-app-Use-malloc_trim-only-on-glibc.patch \ 26 file://0001-app-Use-malloc_trim-only-on-glibc.patch \
27 file://0002-clangformat-Fix-build-with-LLVM-13.patch \
28 file://0003-clangformat-Fix-build-with-LLVM-13.patch \
27" 29"
28SRC_URI_append_libc-musl = " file://0001-Link-with-libexecinfo-on-musl.patch" 30SRC_URI_append_libc-musl = " file://0001-Link-with-libexecinfo-on-musl.patch"
29 31