mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
Remove --debug in favor of LIBCLANG_DISABLE_CRASH_RECOVERY=1
ci/before_deploy.sh: Use the latest libclang.so
This commit is contained in:
parent
ad5ddb51c4
commit
e76a336f19
@ -23,10 +23,10 @@ esac
|
||||
|
||||
pkg=$(mktemp -d)
|
||||
mkdir "$pkg/$name"
|
||||
rsync -rtLR bin "./${libclang[0]}" ./lib/clang+llvm-*/lib/clang/*/include "$pkg/$name"
|
||||
rsync -rtLR bin "./${libclang[-1]}" ./lib/clang+llvm-*/lib/clang/*/include "$pkg/$name"
|
||||
|
||||
cd "$pkg"
|
||||
strip "$strip_option" "$name/bin/cquery" "$name/${libclang[0]}"
|
||||
strip "$strip_option" "$name/bin/cquery" "$name/${libclang[-1]}"
|
||||
case $(uname -s) in
|
||||
Darwin)
|
||||
tar -cf filelist --format=mtree --options="!all,time,mode,type" "$name"
|
||||
|
@ -51,7 +51,6 @@
|
||||
// items per second completed and scales up/down number of running threads.
|
||||
|
||||
std::string g_init_options;
|
||||
bool g_debug;
|
||||
|
||||
namespace {
|
||||
|
||||
@ -88,9 +87,6 @@ Mode:
|
||||
Run as a language server over stdin and stdout
|
||||
|
||||
Other command line options:
|
||||
--debug Disable libclang crash recovery so that in case of libclang or
|
||||
indexer callback issue, the process will crash and we can
|
||||
get a stack trace.
|
||||
--init <initializationOptions>
|
||||
Override client provided initialization options
|
||||
https://github.com/cquery-project/cquery/wiki/Initialization-options
|
||||
@ -444,7 +440,6 @@ int main(int argc, char** argv) {
|
||||
&stdout_waiter);
|
||||
|
||||
PlatformInit();
|
||||
g_debug = HasOption(options, "--debug");
|
||||
IndexInit();
|
||||
|
||||
bool language_server = true;
|
||||
@ -463,7 +458,6 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
if (HasOption(options, "--test-unit")) {
|
||||
g_debug = true;
|
||||
language_server = false;
|
||||
doctest::Context context;
|
||||
context.applyCommandLine(argc, argv);
|
||||
@ -473,7 +467,6 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
|
||||
if (HasOption(options, "--test-index")) {
|
||||
g_debug = true;
|
||||
language_server = false;
|
||||
if (!RunIndexTests(options["--test-index"], !HasOption(options, "--ci")))
|
||||
return 1;
|
||||
|
@ -18,9 +18,6 @@
|
||||
// TODO: See if we can use clang_indexLoc_getFileLocation to get a type ref on
|
||||
// |Foobar| in DISALLOW_COPY(Foobar)
|
||||
|
||||
// Defined in command_line.cc
|
||||
extern bool g_debug;
|
||||
|
||||
#if CINDEX_VERSION >= 47
|
||||
#define CINDEX_HAVE_PRETTY 1
|
||||
#endif
|
||||
@ -699,15 +696,6 @@ void UniqueAdd(std::vector<T>& values, T value) {
|
||||
IdCache::IdCache(const std::string& primary_file)
|
||||
: primary_file(primary_file) {}
|
||||
|
||||
template <typename T>
|
||||
bool Contains(const std::vector<T>& vec, const T& element) {
|
||||
for (const T& entry : vec) {
|
||||
if (entry == element)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnIndexDiagnostic(CXClientData client_data,
|
||||
CXDiagnosticSet diagnostics,
|
||||
void* reserved) {
|
||||
@ -2193,10 +2181,6 @@ optional<std::vector<std::unique_ptr<IndexFile>>> ParseWithTu(
|
||||
|
||||
CXIndexAction index_action = clang_IndexAction_create(index->cx_index);
|
||||
|
||||
// NOTE: libclang re-enables crash recovery whenever a new index is created.
|
||||
if (g_debug)
|
||||
clang_toggleCrashRecovery(0);
|
||||
|
||||
// |index_result| is a CXErrorCode instance.
|
||||
int index_result = clang_indexTranslationUnit(
|
||||
index_action, ¶m, &callback, sizeof(IndexerCallbacks),
|
||||
@ -2268,7 +2252,7 @@ void ConcatTypeAndName(std::string& type, const std::string& name) {
|
||||
|
||||
void IndexInit() {
|
||||
clang_enableStackTraces();
|
||||
if (!g_debug)
|
||||
if (!getenv("LIBCLANG_DISABLE_CRASH_RECOVERY"))
|
||||
clang_toggleCrashRecovery(1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user