[gn build] Port 3986cffe8112
[llvm-project.git] / llvm / utils / gn / secondary / lld / Common / BUILD.gn
blobc0b1c451f2ad5b6be3ba2f031ec1dda4832794b5
1 import("//llvm/utils/gn/build/write_vcsrevision.gni")
3 config("write_vcsrevision_config") {
4   # To pick up the generated inc file.
5   include_dirs = [ target_gen_dir ]
6   visibility = [ ":write_vcsversion" ]
9 write_vcsrevision("write_vcsversion") {
10   visibility = [ ":Common" ]
11   header = "$target_gen_dir/VCSVersion.inc"
12   names = [ "LLD" ]
13   public_configs = [ ":write_vcsrevision_config" ]
16 static_library("Common") {
17   output_name = "lldCommon"
18   configs += [ "//llvm/utils/gn/build:lld_code" ]
19   public_deps = [
20     # public_dep because public header Version.h includes generated Version.inc.
21     "//lld/include/lld/Common:version",
22   ]
23   deps = [
24     ":write_vcsversion",
25     "//llvm/lib/CodeGen",
26     "//llvm/lib/Demangle",
27     "//llvm/lib/IR",
28     "//llvm/lib/MC",
29     "//llvm/lib/Option",
30     "//llvm/lib/Support",
31     "//llvm/lib/Target",
32     "//llvm/lib/TargetParser",
33   ]
34   sources = [
35     "Args.cpp",
36     "BPSectionOrdererBase.cpp",
37     "CommonLinkerContext.cpp",
38     "DWARF.cpp",
39     "DriverDispatcher.cpp",
40     "ErrorHandler.cpp",
41     "Filesystem.cpp",
42     "Memory.cpp",
43     "Reproduce.cpp",
44     "Strings.cpp",
45     "TargetOptionsCommandFlags.cpp",
46     "Timer.cpp",
47     "Version.cpp",
48   ]