[llvm] r360644 - gn build: add Lanai target
David L. Jones via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 20:52:33 PDT 2019
Author: dlj
Date: Mon May 13 20:52:33 2019
New Revision: 360644
URL: http://llvm.org/viewvc/llvm-project?rev=360644&view=rev
Log:
gn build: add Lanai target
Added:
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/AsmParser/
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/AsmParser/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/Disassembler/
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/Disassembler/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/BUILD.gn
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/TargetInfo/
llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/TargetInfo/BUILD.gn
Modified:
llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni
Added: llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/AsmParser/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/AsmParser/BUILD.gn?rev=360644&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/AsmParser/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/AsmParser/BUILD.gn Mon May 13 20:52:33 2019
@@ -0,0 +1,22 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("LanaiGenAsmMatcher") {
+ visibility = [ ":AsmParser" ]
+ args = [ "-gen-asm-matcher" ]
+ td_file = "../Lanai.td"
+}
+
+static_library("AsmParser") {
+ output_name = "LLVMLanaiAsmParser"
+ deps = [
+ ":LanaiGenAsmMatcher",
+ "//llvm/lib/MC",
+ "//llvm/lib/MC/MCParser",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/Lanai/MCTargetDesc",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "LanaiAsmParser.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/BUILD.gn?rev=360644&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/BUILD.gn Mon May 13 20:52:33 2019
@@ -0,0 +1,64 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("LanaiGenCallingConv") {
+ visibility = [ ":LLVMLanaiCodeGen" ]
+ args = [ "-gen-callingconv" ]
+ td_file = "Lanai.td"
+}
+
+tablegen("LanaiGenDAGISel") {
+ visibility = [ ":LLVMLanaiCodeGen" ]
+ args = [ "-gen-dag-isel" ]
+ td_file = "Lanai.td"
+}
+
+static_library("LLVMLanaiCodeGen") {
+ deps = [
+ ":LanaiGenCallingConv",
+ ":LanaiGenDAGISel",
+ "MCTargetDesc",
+ "TargetInfo",
+ "//llvm/include/llvm/Config:llvm-config",
+ "//llvm/lib/Analysis",
+ "//llvm/lib/CodeGen",
+ "//llvm/lib/CodeGen/AsmPrinter",
+ "//llvm/lib/CodeGen/SelectionDAG",
+ "//llvm/lib/IR",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target",
+ ]
+ include_dirs = [ "." ]
+ sources = [
+ "LanaiAsmPrinter.cpp",
+ "LanaiDelaySlotFiller.cpp",
+ "LanaiFrameLowering.cpp",
+ "LanaiInstrInfo.cpp",
+ "LanaiISelDAGToDAG.cpp",
+ "LanaiISelLowering.cpp",
+ "LanaiMachineFunctionInfo.cpp",
+ "LanaiMCInstLower.cpp",
+ "LanaiMemAluCombiner.cpp",
+ "LanaiRegisterInfo.cpp",
+ "LanaiSelectionDAGInfo.cpp",
+ "LanaiSubtarget.cpp",
+ "LanaiTargetMachine.cpp",
+ "LanaiTargetObjectFile.cpp",
+ ]
+}
+
+# This is a bit different from most build files: Due to this group
+# having the directory's name, "//llvm/lib/Target/Lanai" 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("Lanai") {
+ deps = [
+ ":LLVMLanaiCodeGen",
+ "AsmParser",
+ "Disassembler",
+ "MCTargetDesc",
+ "TargetInfo",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/Disassembler/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/Disassembler/BUILD.gn?rev=360644&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/Disassembler/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/Disassembler/BUILD.gn Mon May 13 20:52:33 2019
@@ -0,0 +1,22 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("LanaiGenDisassemblerTables") {
+ visibility = [ ":Disassembler" ]
+ args = [ "-gen-disassembler" ]
+ td_file = "../Lanai.td"
+}
+
+static_library("Disassembler") {
+ output_name = "LLVMLanaiDisassembler"
+ deps = [
+ ":LanaiGenDisassemblerTables",
+ "//llvm/lib/MC/MCDisassembler",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/Lanai/MCTargetDesc",
+ "//llvm/lib/Target/Lanai/TargetInfo",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "LanaiDisassembler.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/BUILD.gn?rev=360644&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/MCTargetDesc/BUILD.gn Mon May 13 20:52:33 2019
@@ -0,0 +1,70 @@
+import("//llvm/utils/TableGen/tablegen.gni")
+
+tablegen("LanaiGenAsmWriter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-asm-writer" ]
+ td_file = "../Lanai.td"
+}
+
+tablegen("LanaiGenInstrInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-instr-info" ]
+ td_file = "../Lanai.td"
+}
+
+tablegen("LanaiGenMCCodeEmitter") {
+ visibility = [ ":MCTargetDesc" ]
+ args = [ "-gen-emitter" ]
+ td_file = "../Lanai.td"
+}
+
+tablegen("LanaiGenRegisterInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-register-info" ]
+ td_file = "../Lanai.td"
+}
+
+tablegen("LanaiGenSubtargetInfo") {
+ visibility = [ ":tablegen" ]
+ args = [ "-gen-subtarget" ]
+ td_file = "../Lanai.td"
+}
+
+# This should contain tablegen targets generating .inc files included
+# by other targets. .inc files only used by .cpp files in this directory
+# should be in deps on the static_library instead.
+group("tablegen") {
+ visibility = [
+ ":MCTargetDesc",
+ "../TargetInfo",
+ ]
+ public_deps = [
+ ":LanaiGenInstrInfo",
+ ":LanaiGenRegisterInfo",
+ ":LanaiGenSubtargetInfo",
+ ]
+}
+
+static_library("MCTargetDesc") {
+ output_name = "LLVMLanaiDesc"
+ public_deps = [
+ ":tablegen",
+ ]
+ deps = [
+ ":LanaiGenAsmWriter",
+ ":LanaiGenMCCodeEmitter",
+ "//llvm/lib/MC",
+ "//llvm/lib/Support",
+ "//llvm/lib/Target/Lanai/TargetInfo",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "LanaiAsmBackend.cpp",
+ "LanaiELFObjectWriter.cpp",
+ "LanaiInstPrinter.cpp",
+ "LanaiMCAsmInfo.cpp",
+ "LanaiMCCodeEmitter.cpp",
+ "LanaiMCExpr.cpp",
+ "LanaiMCTargetDesc.cpp",
+ ]
+}
Added: llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/TargetInfo/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/TargetInfo/BUILD.gn?rev=360644&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/TargetInfo/BUILD.gn (added)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/Lanai/TargetInfo/BUILD.gn Mon May 13 20:52:33 2019
@@ -0,0 +1,11 @@
+static_library("TargetInfo") {
+ output_name = "LLVMLanaiInfo"
+ deps = [
+ "//llvm/lib/IR",
+ "//llvm/lib/Support",
+ ]
+ include_dirs = [ ".." ]
+ sources = [
+ "LanaiTargetInfo.cpp",
+ ]
+}
Modified: llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni?rev=360644&r1=360643&r2=360644&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni (original)
+++ llvm/trunk/utils/gn/secondary/llvm/lib/Target/targets.gni Mon May 13 20:52:33 2019
@@ -23,6 +23,7 @@ if (llvm_targets_to_build == "host") {
"AArch64",
"ARM",
"BPF",
+ "Lanai",
"PowerPC",
"WebAssembly",
"X86",
More information about the llvm-commits
mailing list