1 //===--- Feature.cpp - Compile-time configuration ------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 #include "clang/Basic/Version.h"
11 #include "llvm/Support/Compiler.h"
12 #include "llvm/TargetParser/Host.h"
17 std::string
versionString() { return clang::getClangToolFullVersion("clangd"); }
19 std::string
platformString() {
20 static std::string PlatformString
= []() {
21 std::string Host
= llvm::sys::getProcessTriple();
22 std::string Target
= llvm::sys::getDefaultTargetTriple();
29 return PlatformString
;
32 std::string
featureString() {
36 #elif defined(__APPLE__)
38 #elif defined(__linux__)
40 #elif defined(LLVM_ON_UNIX)
49 #if LLVM_ADDRESS_SANITIZER_BUILD
52 #if LLVM_THREAD_SANITIZER_BUILD
55 #if LLVM_MEMORY_SANITIZER_BUILD
59 #if CLANGD_ENABLE_REMOTE
66 #if !CLANGD_TIDY_CHECKS
70 #if !CLANGD_DECISION_FOREST