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