forked from OSchip/llvm-project
[gn build] include revision information in lld --version output
This commit is contained in:
parent
bed7626f04
commit
5caa121295
|
@ -19,7 +19,7 @@ declare_args() {
|
|||
template("write_vcsrevision") {
|
||||
assert(defined(invoker.header), "must set 'header' in $target_name")
|
||||
|
||||
action("write_vcsrevision") {
|
||||
action(target_name) {
|
||||
script = "//llvm/utils/gn/build/write_vcsrevision.py"
|
||||
header = invoker.header
|
||||
if (defined(invoker.names)) {
|
||||
|
|
|
@ -6,7 +6,7 @@ config("write_vcsrevision_config") {
|
|||
visibility = [ ":write_vcsrevision" ]
|
||||
}
|
||||
|
||||
write_vcsrevision("write_vcsrevision") {
|
||||
write_vcsrevision("write_vcsversion") {
|
||||
visibility = [ ":Basic" ]
|
||||
header = "$target_gen_dir/VCSVersion.inc"
|
||||
names = [
|
||||
|
@ -29,7 +29,7 @@ static_library("Basic") {
|
|||
"//clang/include/clang/Basic:version",
|
||||
]
|
||||
deps = [
|
||||
":write_vcsrevision",
|
||||
":write_vcsversion",
|
||||
"//clang/include/clang/Basic:AttrHasAttributeImpl",
|
||||
"//clang/include/clang/Basic:arm_fp16",
|
||||
"//clang/include/clang/Basic:arm_neon",
|
||||
|
|
|
@ -1,3 +1,18 @@
|
|||
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" ]
|
||||
|
@ -6,6 +21,7 @@ static_library("Common") {
|
|||
"//lld/include/lld/Common:version",
|
||||
]
|
||||
deps = [
|
||||
":write_vcsversion",
|
||||
"//llvm/lib/CodeGen",
|
||||
"//llvm/lib/Demangle",
|
||||
"//llvm/lib/IR",
|
||||
|
@ -25,8 +41,7 @@ static_library("Common") {
|
|||
"TargetOptionsCommandFlags.cpp",
|
||||
"Threads.cpp",
|
||||
"Timer.cpp",
|
||||
|
||||
# FIXME: This should be in its own target that passes -DHAVE_VCS_VERSION_INC
|
||||
"Version.cpp",
|
||||
]
|
||||
defines = [ "HAVE_VCS_VERSION_INC" ] # For Version.cpp
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue