[gn build] Manually port dbed061b

This commit is contained in:
Arthur Eubanks 2021-07-28 15:45:06 -07:00
parent 91842bf6aa
commit 3143ee4ddf
5 changed files with 18 additions and 19 deletions

View File

@ -337,6 +337,7 @@ write_cmake_config("llvm-config") {
"LLVM_NATIVE_TARGET=1",
"LLVM_NATIVE_TARGETINFO=1",
"LLVM_NATIVE_TARGETMC=1",
"LLVM_NATIVE_TARGETMCA=1",
# FIXME: Set to 1 on mac once the 10.14 SDK is in common use.
"LLVM_SUPPORT_XCODE_SIGNPOSTS=",
@ -431,6 +432,12 @@ write_target_def_file("Targets.def") {
value = "LLVM_TARGET"
}
write_target_def_file("TargetMCAs.def") {
key = "LLVM_ENUM_TARGETMCAS"
value = "LLVM_TARGETMCA"
all_targets = []
}
group("write_target_def_files") {
visibility = [
"//llvm/lib/Support",
@ -440,6 +447,7 @@ group("write_target_def_files") {
":AsmParsers.def",
":AsmPrinters.def",
":Disassemblers.def",
":TargetMCAs.def",
":Targets.def",
]
}

View File

@ -241,6 +241,7 @@ group("AMDGPU") {
":LLVMAMDGPUCodeGen",
"AsmParser",
"Disassembler",
"MCA",
"MCTargetDesc",
"TargetInfo",
"Utils",

View File

@ -0,0 +1,9 @@
static_library("MCA") {
output_name = "LLVMAMDGPUTargetMCA"
deps = [
"//llvm/lib/Target/AMDGPU/MCTargetDesc",
"//llvm/lib/Target/AMDGPU/Utils",
]
include_dirs = [ ".." ]
sources = [ "AMDGPUCustomBehaviour.cpp" ]
}

View File

@ -33,8 +33,4 @@ executable("llvm-mca") {
"llvm-mca.cpp",
]
defines = []
if (llvm_build_AMDGPU) {
deps += [ "//llvm/tools/llvm-mca/lib/AMDGPU" ]
defines += [ "HAS_AMDGPU" ]
}
}

View File

@ -1,15 +0,0 @@
static_library("AMDGPU") {
output_name = "LLVMMCACustomBehaviourAMDGPU"
deps = [
"//llvm/lib/IR",
"//llvm/lib/Support",
"//llvm/lib/Target/AMDGPU",
# llvm-mca/libAMDGPU reaches inside the Target/AMDGPU tablegen internals
# and must depend on these Target/AMDGPU-internal build targets.
"//llvm/lib/Target/AMDGPU/MCTargetDesc",
"//llvm/lib/Target/AMDGPU/Utils",
]
include_dirs = [ "//llvm/lib/Target/AMDGPU" ]
sources = [ "AMDGPUCustomBehaviour.cpp" ]
}