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/Config/llvm-config.h" // for LLVM_ON_UNIX
12 #include "llvm/Support/Compiler.h"
13 #include "llvm/TargetParser/Host.h"
18 std::string
versionString() { return clang::getClangToolFullVersion("clangd"); }
20 std::string
platformString() {
21 static std::string PlatformString
= []() {
22 std::string Host
= llvm::sys::getProcessTriple();
23 std::string Target
= llvm::sys::getDefaultTargetTriple();
30 return PlatformString
;
33 std::string
featureString() {
37 #elif defined(__APPLE__)
39 #elif defined(__linux__)
41 #elif defined(LLVM_ON_UNIX)
50 #if LLVM_ADDRESS_SANITIZER_BUILD
53 #if LLVM_THREAD_SANITIZER_BUILD
56 #if LLVM_MEMORY_SANITIZER_BUILD
60 #if CLANGD_ENABLE_REMOTE
67 #if !CLANGD_TIDY_CHECKS
71 #if !CLANGD_DECISION_FOREST