From f63ca8df81bc36dc725f702a3a1d910a626ecf55 Mon Sep 17 00:00:00 2001 From: Noah Santschi-Cooney Date: Thu, 19 Nov 2020 15:52:19 +0000 Subject: [PATCH] Pass one of backward-cpp based backtraces on failure --- .gitignore | 6 ++++++ .gitmodules | 3 +++ CMakeLists.txt | 2 ++ src/indexer/CMakeLists.txt | 9 +++++++-- src/indexer/backward-cpp | 1 + 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 160000 src/indexer/backward-cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..8b72f84814 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +build +bin +.clangd +compile_commands.json +dump.lsif +cmake-build-debug \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..4225bd1d50 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/indexer/backward-cpp"] + path = src/indexer/backward-cpp + url = git@github.com:bombela/backward-cpp.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 069a0aee90..407381f9ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.16) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +set(CMAKE_BUILD_TYPE RelWithDebInfo) +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -DNDEBUG -g") include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src) set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) diff --git a/src/indexer/CMakeLists.txt b/src/indexer/CMakeLists.txt index 6daba144c4..3798f1583f 100644 --- a/src/indexer/CMakeLists.txt +++ b/src/indexer/CMakeLists.txt @@ -1,8 +1,13 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backward-cpp) + add_executable(lsif-clang - IndexerMain.cpp - ) + IndexerMain.cpp + ${BACKWARD_ENABLE} +) + +add_backward(lsif-clang) install(TARGETS lsif-clang) diff --git a/src/indexer/backward-cpp b/src/indexer/backward-cpp new file mode 160000 index 0000000000..27a89004a8 --- /dev/null +++ b/src/indexer/backward-cpp @@ -0,0 +1 @@ +Subproject commit 27a89004a86fe2a665f041c198c7fbab7489e278