Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Differential Revision: https://reviews.llvm.org/D57436 llvm-svn: 352705
- Loading branch information
Showing
7 changed files
with
241 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
llvm/utils/gn/secondary/llvm/lib/Target/BPF/AsmParser/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import("//llvm/utils/TableGen/tablegen.gni") | ||
|
||
tablegen("BPFGenAsmMatcher") { | ||
visibility = [ ":AsmParser" ] | ||
args = [ "-gen-asm-matcher" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
static_library("AsmParser") { | ||
output_name = "LLVMBPFAsmParser" | ||
deps = [ | ||
":BPFGenAsmMatcher", | ||
"//llvm/lib/MC", | ||
"//llvm/lib/MC/MCParser", | ||
"//llvm/lib/Support", | ||
"//llvm/lib/Target/BPF/MCTargetDesc", | ||
"//llvm/lib/Target/BPF/TargetInfo", | ||
] | ||
include_dirs = [ ".." ] | ||
sources = [ | ||
"BPFAsmParser.cpp", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
import("//llvm/utils/TableGen/tablegen.gni") | ||
|
||
tablegen("BPFGenCallingConv") { | ||
visibility = [ ":LLVMBPFCodeGen" ] | ||
args = [ "-gen-callingconv" ] | ||
td_file = "BPF.td" | ||
} | ||
|
||
tablegen("BPFGenDAGISel") { | ||
visibility = [ ":LLVMBPFCodeGen" ] | ||
args = [ "-gen-dag-isel" ] | ||
td_file = "BPF.td" | ||
} | ||
|
||
tablegen("BPFGenFastISel") { | ||
visibility = [ ":LLVMBPFCodeGen" ] | ||
args = [ "-gen-fast-isel" ] | ||
td_file = "BPF.td" | ||
} | ||
|
||
tablegen("BPFGenGlobalISel") { | ||
visibility = [ ":LLVMBPFCodeGen" ] | ||
args = [ "-gen-global-isel" ] | ||
td_file = "BPF.td" | ||
} | ||
|
||
tablegen("BPFGenMCPseudoLowering") { | ||
visibility = [ ":LLVMBPFCodeGen" ] | ||
args = [ "-gen-pseudo-lowering" ] | ||
td_file = "BPF.td" | ||
} | ||
|
||
tablegen("BPFGenRegisterBank") { | ||
visibility = [ ":LLVMBPFCodeGen" ] | ||
args = [ "-gen-register-bank" ] | ||
td_file = "BPF.td" | ||
} | ||
|
||
static_library("LLVMBPFCodeGen") { | ||
deps = [ | ||
":BPFGenCallingConv", | ||
":BPFGenDAGISel", | ||
":BPFGenFastISel", | ||
":BPFGenGlobalISel", | ||
":BPFGenMCPseudoLowering", | ||
":BPFGenRegisterBank", | ||
"InstPrinter", | ||
"MCTargetDesc", | ||
"TargetInfo", | ||
"//llvm/include/llvm/Config:llvm-config", | ||
"//llvm/lib/Analysis", | ||
"//llvm/lib/CodeGen", | ||
"//llvm/lib/CodeGen/AsmPrinter", | ||
"//llvm/lib/CodeGen/GlobalISel", | ||
"//llvm/lib/CodeGen/SelectionDAG", | ||
"//llvm/lib/IR", | ||
"//llvm/lib/MC", | ||
"//llvm/lib/Support", | ||
"//llvm/lib/Target", | ||
] | ||
include_dirs = [ "." ] | ||
sources = [ | ||
"BPFAsmPrinter.cpp", | ||
"BPFFrameLowering.cpp", | ||
"BPFISelDAGToDAG.cpp", | ||
"BPFISelLowering.cpp", | ||
"BPFInstrInfo.cpp", | ||
"BPFMCInstLower.cpp", | ||
"BPFMIChecking.cpp", | ||
"BPFMIPeephole.cpp", | ||
"BPFRegisterInfo.cpp", | ||
"BPFSelectionDAGInfo.cpp", | ||
"BPFSubtarget.cpp", | ||
"BPFTargetMachine.cpp", | ||
"BTFDebug.cpp", | ||
] | ||
} | ||
|
||
# This is a bit different from most build files: Due to this group | ||
# having the directory's name, "//llvm/lib/Target/BPF" will refer to this | ||
# target, which pulls in the code in this directory *and all subdirectories*. | ||
# For most other directories, "//llvm/lib/Foo" only pulls in the code directly | ||
# in "llvm/lib/Foo". The forwarding targets in //llvm/lib/Target expect this | ||
# different behavior. | ||
group("BPF") { | ||
deps = [ | ||
":LLVMBPFCodeGen", | ||
"AsmParser", | ||
"Disassembler", | ||
"InstPrinter", | ||
"MCTargetDesc", | ||
"TargetInfo", | ||
] | ||
} |
22 changes: 22 additions & 0 deletions
22
llvm/utils/gn/secondary/llvm/lib/Target/BPF/Disassembler/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import("//llvm/utils/TableGen/tablegen.gni") | ||
|
||
tablegen("BPFGenDisassemblerTables") { | ||
visibility = [ ":Disassembler" ] | ||
args = [ "-gen-disassembler" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
static_library("Disassembler") { | ||
output_name = "LLVMBPFDisassembler" | ||
deps = [ | ||
":BPFGenDisassemblerTables", | ||
"//llvm/lib/MC", | ||
"//llvm/lib/MC/MCDisassembler", | ||
"//llvm/lib/Support", | ||
"//llvm/lib/Target/BPF/MCTargetDesc", | ||
] | ||
include_dirs = [ ".." ] | ||
sources = [ | ||
"BPFDisassembler.cpp", | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
llvm/utils/gn/secondary/llvm/lib/Target/BPF/InstPrinter/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import("//llvm/utils/TableGen/tablegen.gni") | ||
|
||
tablegen("BPFGenAsmWriter") { | ||
visibility = [ ":InstPrinter" ] | ||
args = [ "-gen-asm-writer" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
static_library("InstPrinter") { | ||
output_name = "LLVMBPFAsmPrinter" | ||
deps = [ | ||
":BPFGenAsmWriter", | ||
"//llvm/lib/MC", | ||
"//llvm/lib/Support", | ||
|
||
# MCTargetDesc depends on InstPrinter, so we can't depend on the full | ||
# MCTargetDesc target here: it would form a cycle. | ||
"//llvm/lib/Target/BPF/MCTargetDesc:tablegen", | ||
] | ||
include_dirs = [ ".." ] | ||
sources = [ | ||
"BPFInstPrinter.cpp", | ||
] | ||
} |
60 changes: 60 additions & 0 deletions
60
llvm/utils/gn/secondary/llvm/lib/Target/BPF/MCTargetDesc/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import("//llvm/utils/TableGen/tablegen.gni") | ||
|
||
tablegen("BPFGenInstrInfo") { | ||
visibility = [ ":tablegen" ] | ||
args = [ "-gen-instr-info" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
tablegen("BPFGenMCCodeEmitter") { | ||
visibility = [ ":tablegen" ] | ||
args = [ "-gen-emitter" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
tablegen("BPFGenRegisterInfo") { | ||
visibility = [ ":tablegen" ] | ||
args = [ "-gen-register-info" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
tablegen("BPFGenSubtargetInfo") { | ||
visibility = [ ":tablegen" ] | ||
args = [ "-gen-subtarget" ] | ||
td_file = "../BPF.td" | ||
} | ||
|
||
group("tablegen") { | ||
visibility = [ | ||
":MCTargetDesc", | ||
"../InstPrinter", | ||
"../TargetInfo", | ||
] | ||
public_deps = [ | ||
":BPFGenInstrInfo", | ||
":BPFGenMCCodeEmitter", | ||
":BPFGenRegisterInfo", | ||
":BPFGenSubtargetInfo", | ||
] | ||
} | ||
|
||
static_library("MCTargetDesc") { | ||
output_name = "LLVMBPFDesc" | ||
public_deps = [ | ||
":tablegen", | ||
] | ||
deps = [ | ||
"//llvm/lib/MC", | ||
"//llvm/lib/MC/MCDisassembler", | ||
"//llvm/lib/Support", | ||
"//llvm/lib/Target/BPF/InstPrinter", | ||
"//llvm/lib/Target/BPF/TargetInfo", | ||
] | ||
include_dirs = [ ".." ] | ||
sources = [ | ||
"BPFAsmBackend.cpp", | ||
"BPFELFObjectWriter.cpp", | ||
"BPFMCCodeEmitter.cpp", | ||
"BPFMCTargetDesc.cpp", | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
llvm/utils/gn/secondary/llvm/lib/Target/BPF/TargetInfo/BUILD.gn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
static_library("TargetInfo") { | ||
output_name = "LLVMBPFInfo" | ||
deps = [ | ||
"//llvm/lib/Support", | ||
|
||
# MCTargetDesc depends on TargetInfo, so we can't depend on the full | ||
# MCTargetDesc target here: it would form a cycle. | ||
"//llvm/lib/Target/BPF/MCTargetDesc:tablegen", | ||
] | ||
include_dirs = [ ".." ] | ||
sources = [ | ||
"BPFTargetInfo.cpp", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters