forked from qt-creator/qt-creator
Clang: Use CrashHandler for clangbackend
Change-Id: Ic51e9c3227744fa087ade4bde9a7b5f421024f6f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -14,6 +14,9 @@ INCLUDEPATH += $$LLVM_INCLUDEPATH
|
|||||||
|
|
||||||
SOURCES += clangbackendmain.cpp
|
SOURCES += clangbackendmain.cpp
|
||||||
|
|
||||||
|
HEADERS += ../qtcreatorcrashhandler/crashhandlersetup.h
|
||||||
|
SOURCES += ../qtcreatorcrashhandler/crashhandlersetup.cpp
|
||||||
|
|
||||||
unix {
|
unix {
|
||||||
!osx: QMAKE_LFLAGS += -Wl,-z,origin
|
!osx: QMAKE_LFLAGS += -Wl,-z,origin
|
||||||
!contains(QMAKE_DEFAULT_LIBDIRS, $${LLVM_LIBDIR}):!disable_external_rpath: QMAKE_LFLAGS += -Wl,-rpath,$$shell_quote($${LLVM_LIBDIR})
|
!contains(QMAKE_DEFAULT_LIBDIRS, $${LLVM_LIBDIR}):!disable_external_rpath: QMAKE_LFLAGS += -Wl,-rpath,$$shell_quote($${LLVM_LIBDIR})
|
||||||
|
@@ -14,6 +14,14 @@ QtcTool {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Group {
|
||||||
|
prefix: "../qtcreatorcrashhandler/"
|
||||||
|
files: [
|
||||||
|
"crashhandlersetup.h",
|
||||||
|
"crashhandlersetup.cpp",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
files: [ "clangbackendmain.cpp" ]
|
files: [ "clangbackendmain.cpp" ]
|
||||||
|
|
||||||
condition: libclang.present
|
condition: libclang.present
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include "../qtcreatorcrashhandler/crashhandlersetup.h"
|
||||||
|
|
||||||
#include <QCommandLineParser>
|
#include <QCommandLineParser>
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
@@ -61,8 +63,10 @@ int main(int argc, char *argv[])
|
|||||||
QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0"));
|
QCoreApplication::setApplicationVersion(QStringLiteral("1.0.0"));
|
||||||
|
|
||||||
QCoreApplication application(argc, argv);
|
QCoreApplication application(argc, argv);
|
||||||
|
CrashHandlerSetup setupCrashHandler(QCoreApplication::applicationName(),
|
||||||
|
CrashHandlerSetup::DisableRestart);
|
||||||
|
|
||||||
const QString connection = processArguments(application);
|
const QString connection = processArguments(application);
|
||||||
|
|
||||||
clang_toggleCrashRecovery(true);
|
clang_toggleCrashRecovery(true);
|
||||||
clang_enableStackTraces();
|
clang_enableStackTraces();
|
||||||
|
Reference in New Issue
Block a user