Ivan Murashko 56ac9d46a7 [clangd] Add library for clangd main function
The diff adds a library and header for clangd main function. That change allows to create custom builds for clangd outside the main LLVM repo. The diff also allows to use build system different from CMake to build clangd. The main reason for such change is an ability to use custom clang-tidy modules (created outside LLVM repo).

Test Plan:
```
ninja clangd
```
also check that necessary libs are installed aka
```
ninja install
...
ls <install folder>/lib/libclangdMain.a
```

Differential Revision: https://reviews.llvm.org/D145302
2023-07-11 21:48:50 +01:00

14 lines
479 B
C++

//===--- ClangdToolMain.cpp - clangd main function ------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "ClangdMain.h"
int main(int argc, char **argv) {
return clang::clangd::clangdMain(argc, argv);
}