forked from qt-creator/qt-creator
Enable Clang Refactoring compiling
We change QTC_ENABLE_CLANG_LIBTOOLING to QTC_DISABLE_CLANG_REFACTORING, so you now have to opt out instead of opt in. We bump the minimum version of LLVM to 7.0 too because we mentioned that in the README already. Change-Id: Ic4ee29a74a3ed79634ed8ea50be84d7bdc7db4ef Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
committed by
Ivan Donchevskii
parent
2f6d43745a
commit
89e70ca785
@@ -36,7 +36,8 @@ Prerequisites:
|
||||
* On Linux: g++ 5.3 or later
|
||||
* LLVM/Clang 7.0.0 or later (optional, needed for the Clang Code Model, Clang Tools, ClangFormat,
|
||||
Clang PCH Manager and Clang Refactoring plugins, see the section
|
||||
"Get LLVM/Clang for the Clang Code Model")
|
||||
"Get LLVM/Clang for the Clang Code Model". The LLVM C++ API provides no compatibility garantee,
|
||||
so if later versions don't compile we don't support that version.)
|
||||
* CMake (only for manual builds of LLVM/Clang)
|
||||
* Qbs 1.7.x (optional, sources also contain Qbs itself)
|
||||
|
||||
@@ -46,6 +47,8 @@ You can build Qt Creator with
|
||||
|
||||
# Optional, needed for the Clang Code Model if llvm-config is not in PATH:
|
||||
export LLVM_INSTALL_DIR=/path/to/llvm (or "set" on Windows)
|
||||
# Optional, disable Clang Refactoring
|
||||
export QTC_DISABLE_CLANG_REFACTORING=1
|
||||
# Optional, needed to let the QbsProjectManager plugin use system Qbs:
|
||||
export QBS_INSTALL_DIR=/path/to/qbs
|
||||
# Optional, needed for the Python enabled dumper on Windows
|
||||
|
@@ -14,10 +14,15 @@ SUBDIRS += \
|
||||
qmleditorwidgets \
|
||||
glsl \
|
||||
ssh \
|
||||
sqlite \
|
||||
clangsupport \
|
||||
languageserverprotocol
|
||||
|
||||
|
||||
QTC_DISABLE_CLANG_REFACTORING=$$(QTC_DISABLE_CLANG_REFACTORING)
|
||||
isEmpty(QTC_DISABLE_CLANG_REFACTORING) {
|
||||
SUBDIRS += sqlite
|
||||
}
|
||||
|
||||
qtHaveModule(quick) {
|
||||
SUBDIRS += \
|
||||
tracing
|
||||
|
13
src/libs/sqlite/README.md
Normal file
13
src/libs/sqlite/README.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# SQLite
|
||||
|
||||
Minimum version is the same as the sqlite version in the source tree.
|
||||
|
||||
We compile SQLite with the flowing settings:
|
||||
* SQLITE_THREADSAFE=2
|
||||
* SQLITE_ENABLE_FTS4
|
||||
* SQLITE_ENABLE_FTS3_PARENTHESIS
|
||||
* SQLITE_ENABLE_UNLOCK_NOTIFY
|
||||
* SQLITE_ENABLE_COLUMN_METADATA
|
||||
* SQLITE_ENABLE_JSON1
|
||||
|
||||
Be prepared that we demand more functionality from SQLite in the future.
|
@@ -48,4 +48,6 @@ HEADERS += \
|
||||
DEFINES += SQLITE_THREADSAFE=2 SQLITE_ENABLE_FTS4 SQLITE_ENABLE_FTS3_PARENTHESIS \
|
||||
SQLITE_ENABLE_UNLOCK_NOTIFY SQLITE_ENABLE_COLUMN_METADATA SQLITE_ENABLE_JSON1
|
||||
|
||||
OTHER_FILES += README.md
|
||||
|
||||
contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
|
||||
|
@@ -110,12 +110,10 @@ exists(../shared/qbs/qbs.pro)|!isEmpty(QBS_INSTALL_DIR): \
|
||||
SUBDIRS += \
|
||||
clangcodemodel
|
||||
|
||||
QTC_ENABLE_CLANG_LIBTOOLING=$$(QTC_ENABLE_CLANG_LIBTOOLING)
|
||||
!isEmpty(QTC_ENABLE_CLANG_LIBTOOLING) {
|
||||
QTC_DISABLE_CLANG_REFACTORING=$$(QTC_DISABLE_CLANG_REFACTORING)
|
||||
isEmpty(QTC_DISABLE_CLANG_REFACTORING) {
|
||||
SUBDIRS += clangrefactoring
|
||||
SUBDIRS += clangpchmanager
|
||||
} else {
|
||||
warning("Not building the clang refactoring plugin and the pch manager plugin.")
|
||||
}
|
||||
|
||||
isEmpty(IDE_PACKAGE_MODE) {
|
||||
|
@@ -163,10 +163,10 @@ isEmpty(LLVM_VERSION) {
|
||||
$$llvmWarningOrError(\
|
||||
"Cannot determine clang version. Set LLVM_INSTALL_DIR to build the Clang Code Model",\
|
||||
"LLVM_INSTALL_DIR does not contain a valid llvm-config, candidate: $$llvm_config")
|
||||
} else:!versionIsAtLeast($$LLVM_VERSION, 6, 0, 0): {
|
||||
} else:!versionIsAtLeast($$LLVM_VERSION, 7, 0, 0): {
|
||||
# CLANG-UPGRADE-CHECK: Adapt minimum version numbers.
|
||||
$$llvmWarningOrError(\
|
||||
"LLVM/Clang version >= 6.0.0 required, version provided: $$LLVM_VERSION")
|
||||
"LLVM/Clang version >= 7.0.0 required, version provided: $$LLVM_VERSION")
|
||||
LLVM_VERSION =
|
||||
} else {
|
||||
# CLANG-UPGRADE-CHECK: Remove suppression if this warning is resolved.
|
||||
@@ -196,19 +196,11 @@ isEmpty(LLVM_VERSION) {
|
||||
|
||||
CLANGFORMAT_MAIN_HEADER = $$LLVM_INCLUDEPATH/clang/Format/Format.h
|
||||
exists($$CLANGFORMAT_MAIN_HEADER) {
|
||||
versionIsAtLeast($$LLVM_VERSION, 7, 0, 0): {
|
||||
CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
|
||||
ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
|
||||
-lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
||||
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
||||
-lclangASTMatchers -lclangAST -lclangLex -lclangBasic
|
||||
} else:versionIsAtLeast($$LLVM_VERSION, 6, 0, 0): {
|
||||
CLANGFORMAT_LIBS=-lclangFormat -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
|
||||
ALL_CLANG_LIBS=-lclangFormat -lclangTooling -lclangToolingCore \
|
||||
-lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
||||
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
||||
-lclangASTMatchers -lclangAST -lclangLex -lclangBasic
|
||||
}
|
||||
CLANGFORMAT_LIBS=-lclangFormat -lclangToolingInclusions -lclangToolingCore -lclangRewrite -lclangLex -lclangBasic
|
||||
ALL_CLANG_LIBS=-lclangFormat -lclangToolingInclusions -lclangTooling -lclangToolingCore \
|
||||
-lclangRewrite -lclangIndex -lclangFrontend -lclangParse -lclangSerialization \
|
||||
-lclangSema -lclangEdit -lclangAnalysis -lclangDriver -lclangDynamicASTMatchers \
|
||||
-lclangASTMatchers -lclangAST -lclangLex -lclangBasic
|
||||
win32:CLANGFORMAT_LIBS += -lversion
|
||||
}
|
||||
win32:ALL_CLANG_LIBS += -lversion
|
||||
@@ -232,12 +224,10 @@ isEmpty(LLVM_VERSION) {
|
||||
!contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LIBCLANG_LIBS = -L$${LLVM_LIBDIR}
|
||||
LIBCLANG_LIBS += $${CLANG_LIB}
|
||||
|
||||
QTC_ENABLE_CLANG_LIBTOOLING=$$(QTC_ENABLE_CLANG_LIBTOOLING)
|
||||
!isEmpty(QTC_ENABLE_CLANG_LIBTOOLING) {
|
||||
QTC_DISABLE_CLANG_REFACTORING=$$(QTC_DISABLE_CLANG_REFACTORING)
|
||||
isEmpty(QTC_DISABLE_CLANG_REFACTORING) {
|
||||
!contains(QMAKE_DEFAULT_LIBDIRS, $$LLVM_LIBDIR): LIBTOOLING_LIBS = -L$${LLVM_LIBDIR}
|
||||
LIBTOOLING_LIBS += $$CLANGTOOLING_LIBS $$LLVM_STATIC_LIBS
|
||||
} else {
|
||||
warning("Clang LibTooling is disabled. Set QTC_ENABLE_CLANG_LIBTOOLING to enable it.")
|
||||
}
|
||||
|
||||
!isEmpty(CLANGFORMAT_LIBS) {
|
||||
|
@@ -26,12 +26,10 @@ mac {
|
||||
|
||||
SUBDIRS += clangbackend
|
||||
|
||||
QTC_ENABLE_CLANG_LIBTOOLING=$$(QTC_ENABLE_CLANG_LIBTOOLING)
|
||||
!isEmpty(QTC_ENABLE_CLANG_LIBTOOLING) {
|
||||
QTC_DISABLE_CLANG_REFACTORING=$$(QTC_DISABLE_CLANG_REFACTORING)
|
||||
isEmpty(QTC_DISABLE_CLANG_REFACTORING) {
|
||||
SUBDIRS += clangrefactoringbackend
|
||||
SUBDIRS += clangpchmanagerbackend
|
||||
} else {
|
||||
warning("Not building the clang refactoring backend and the pch manager backend.")
|
||||
}
|
||||
|
||||
isEmpty(BUILD_CPLUSPLUS_TOOLS):BUILD_CPLUSPLUS_TOOLS=$$(BUILD_CPLUSPLUS_TOOLS)
|
||||
|
Reference in New Issue
Block a user