| 1 |
import("//llvm/utils/gn/build/write_vcsrevision.gni") |
| 2 |
|
| 3 |
config("write_vcsrevision_config") { |
| 4 |
# To pick up the generated inc file. |
| 5 |
include_dirs = [ target_gen_dir ] |
| 6 |
visibility = [ ":write_vcsversion" ] |
| 7 |
} |
| 8 |
|
| 9 |
write_vcsrevision("write_vcsversion") { |
| 10 |
visibility = [ ":Common" ] |
| 11 |
header = "$target_gen_dir/VCSVersion.inc" |
| 12 |
names = [ "LLD" ] |
| 13 |
public_configs = [ ":write_vcsrevision_config" ] |
| 14 |
} |
| 15 |
|
| 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 |
"CommonLinkerContext.cpp", |
| 37 |
"DWARF.cpp", |
| 38 |
"DriverDispatcher.cpp", |
| 39 |
"ErrorHandler.cpp", |
| 40 |
"Filesystem.cpp", |
| 41 |
"Memory.cpp", |
| 42 |
"Reproduce.cpp", |
| 43 |
"Strings.cpp", |
| 44 |
"TargetOptionsCommandFlags.cpp", |
| 45 |
"Timer.cpp", |
| 46 |
"Utils.cpp", |
| 47 |
"Version.cpp", |
| 48 |
] |
| 49 |
} |