-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gn build: Add some build files for clangd
Enough to build the clangd binaries, but this is still missing build files for: - fuzzer - indexer - index/dex/dexp - benchmarks - xpc Differential Revision: https://reviews.llvm.org/D59899 llvm-svn: 357182
- Loading branch information
Showing
7 changed files
with
181 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
config("atomic_config") { | ||
visibility = [ ":atomic" ] | ||
libs = [ "atomic" ] | ||
} | ||
|
||
group("atomic") { | ||
# Needed on platforms that have no native support for 64-bit atomics. | ||
# FIXME: Check which platforms need this; certainly needs to be false on | ||
# macOS and Windows, and doesn't seem to be needed on Linux either. | ||
needs_explicit_lib_atomic = false | ||
if (needs_explicit_lib_atomic) { | ||
public_configs = [ ":atomic_config" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
llvm/utils/gn/secondary/clang-tools-extra/clang-apply-replacements/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
static_library("clangd") { | ||
output_name = "clangDaemon" | ||
configs += [ "//llvm/utils/gn/build:clang_code" ] | ||
deps = [ | ||
"//clang-tools-extra/clang-tidy/abseil", | ||
"//clang-tools-extra/clang-tidy/android", | ||
"//clang-tools-extra/clang-tidy/boost", | ||
"//clang-tools-extra/clang-tidy/bugprone", | ||
"//clang-tools-extra/clang-tidy/cert", | ||
"//clang-tools-extra/clang-tidy/cppcoreguidelines", | ||
"//clang-tools-extra/clang-tidy/fuchsia", | ||
"//clang-tools-extra/clang-tidy/google", | ||
"//clang-tools-extra/clang-tidy/hicpp", | ||
"//clang-tools-extra/clang-tidy/llvm", | ||
"//clang-tools-extra/clang-tidy/misc", | ||
"//clang-tools-extra/clang-tidy/modernize", | ||
"//clang-tools-extra/clang-tidy/objc", | ||
"//clang-tools-extra/clang-tidy/performance", | ||
"//clang-tools-extra/clang-tidy/portability", | ||
"//clang-tools-extra/clang-tidy/readability", | ||
"//clang-tools-extra/clang-tidy/zircon", | ||
"//clang/lib/AST", | ||
"//clang/lib/ASTMatchers", | ||
"//clang/lib/Basic", | ||
"//clang/lib/Driver", | ||
"//clang/lib/Format", | ||
"//clang/lib/Frontend", | ||
"//clang/lib/Index", | ||
"//clang/lib/Lex", | ||
"//clang/lib/Sema", | ||
"//clang/lib/Serialization", | ||
"//clang/lib/Tooling", | ||
"//clang/lib/Tooling/Core", | ||
"//clang/lib/Tooling/Inclusions", | ||
"//clang/lib/Tooling/Refactoring", | ||
"//llvm/lib/Support", | ||
"//llvm/utils/gn/build/libs/atomic", | ||
"//llvm/utils/gn/build/libs/pthread", | ||
] | ||
include_dirs = [ "." ] | ||
sources = [ | ||
"AST.cpp", | ||
"Cancellation.cpp", | ||
"ClangdLSPServer.cpp", | ||
"ClangdServer.cpp", | ||
"ClangdUnit.cpp", | ||
"CodeComplete.cpp", | ||
"CodeCompletionStrings.cpp", | ||
"Compiler.cpp", | ||
"Context.cpp", | ||
"Diagnostics.cpp", | ||
"DraftStore.cpp", | ||
"ExpectedTypes.cpp", | ||
"FS.cpp", | ||
"FSProvider.cpp", | ||
"FileDistance.cpp", | ||
"FindSymbols.cpp", | ||
"FuzzyMatch.cpp", | ||
"GlobalCompilationDatabase.cpp", | ||
"Headers.cpp", | ||
"IncludeFixer.cpp", | ||
"JSONTransport.cpp", | ||
"Logger.cpp", | ||
"Protocol.cpp", | ||
"Quality.cpp", | ||
"RIFF.cpp", | ||
"Selection.cpp", | ||
"SourceCode.cpp", | ||
"TUScheduler.cpp", | ||
"Threading.cpp", | ||
"Trace.cpp", | ||
"URI.cpp", | ||
"XRefs.cpp", | ||
"index/Background.cpp", | ||
"index/BackgroundIndexStorage.cpp", | ||
"index/CanonicalIncludes.cpp", | ||
"index/FileIndex.cpp", | ||
"index/Index.cpp", | ||
"index/IndexAction.cpp", | ||
"index/MemIndex.cpp", | ||
"index/Merge.cpp", | ||
"index/Ref.cpp", | ||
"index/Serialization.cpp", | ||
"index/Symbol.cpp", | ||
"index/SymbolCollector.cpp", | ||
"index/SymbolID.cpp", | ||
"index/SymbolLocation.cpp", | ||
"index/SymbolOrigin.cpp", | ||
"index/YAMLSerialization.cpp", | ||
"index/dex/Dex.cpp", | ||
"index/dex/Iterator.cpp", | ||
"index/dex/PostingList.cpp", | ||
"index/dex/Trigram.cpp", | ||
"refactor/Tweak.cpp", | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
llvm/utils/gn/secondary/clang-tools-extra/clangd/refactor/tweaks/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# A target containing all code tweaks (i.e. mini-refactorings) provided by | ||
# clangd. | ||
# Built as a source_set to make sure the linker does not remove global | ||
# constructors that register individual tweaks in a global registry. | ||
source_set("tweaks") { | ||
configs += [ "//llvm/utils/gn/build:clang_code" ] | ||
deps = [ | ||
"//clang-tools-extra/clangd", | ||
"//clang/lib/AST", | ||
"//clang/lib/Tooling/Core", | ||
"//llvm/lib/Support", | ||
] | ||
include_dirs = [ "../.." ] | ||
sources = [ | ||
"SwapIfBranches.cpp", | ||
] | ||
} |
50 changes: 50 additions & 0 deletions
50
llvm/utils/gn/secondary/clang-tools-extra/clangd/tool/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import("//llvm/utils/gn/build/write_cmake_config.gni") | ||
|
||
declare_args() { | ||
# Whether to build clangd's XPC components. | ||
clangd_build_xpc = false | ||
} | ||
|
||
write_cmake_config("features") { | ||
# FIXME: Try moving Features.inc.in to tools, seems like a better location. | ||
input = "../Features.inc.in" | ||
output = "$target_gen_dir/Features.inc" | ||
values = [] | ||
if (clangd_build_xpc) { | ||
values += [ "CLANGD_BUILD_XPC=1" ] | ||
} else { | ||
values += [ "CLANGD_BUILD_XPC=0" ] | ||
} | ||
} | ||
|
||
executable("clangd") { | ||
configs += [ "//llvm/utils/gn/build:clang_code" ] | ||
deps = [ | ||
":features", | ||
"//clang-tools-extra/clang-tidy", | ||
"//clang-tools-extra/clangd", | ||
"//clang-tools-extra/clangd/refactor/tweaks", | ||
"//clang/lib/AST", | ||
"//clang/lib/Basic", | ||
"//clang/lib/Format", | ||
"//clang/lib/Frontend", | ||
"//clang/lib/Sema", | ||
"//clang/lib/Tooling", | ||
"//clang/lib/Tooling/Core", | ||
"//llvm/lib/Support", | ||
] | ||
|
||
include_dirs = [ | ||
"..", | ||
|
||
# To pick up the generated inc files. | ||
"$target_gen_dir", | ||
] | ||
sources = [ | ||
"ClangdMain.cpp", | ||
] | ||
|
||
if (clangd_build_xpc) { | ||
# FIXME: Depend on clangdXpcJsonConversions, clangdXpcTransport | ||
} | ||
} |