[llvm] d1bbb85 - [gn build] (manually) port 0b2bc69ba29

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 19:41:18 PDT 2021


Author: Nico Weber
Date: 2021-04-22T22:40:53-04:00
New Revision: d1bbb8533a2294e2d2434ba8f3bb07cb39d303ba

URL: https://github.com/llvm/llvm-project/commit/d1bbb8533a2294e2d2434ba8f3bb07cb39d303ba
DIFF: https://github.com/llvm/llvm-project/commit/d1bbb8533a2294e2d2434ba8f3bb07cb39d303ba.diff

LOG: [gn build] (manually) port 0b2bc69ba29

Added: 
    llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn

Modified: 
    llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/AsmParser/BUILD.gn
    llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn
    llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Disassembler/BUILD.gn
    llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/MCTargetDesc/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/AsmParser/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/AsmParser/BUILD.gn
index d7180b52f0f70..ce29b3516f48c 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/AsmParser/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/AsmParser/BUILD.gn
@@ -15,6 +15,7 @@ static_library("AsmParser") {
     "//llvm/lib/Support",
     "//llvm/lib/Target/WebAssembly/MCTargetDesc",
     "//llvm/lib/Target/WebAssembly/TargetInfo",
+    "//llvm/lib/Target/WebAssembly/Utils",
   ]
   include_dirs = [ ".." ]
   sources = [ "WebAssemblyAsmParser.cpp" ]

diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn
index dba1f9826918b..5e3c4e73f38b3 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn
@@ -72,7 +72,6 @@ static_library("LLVMWebAssemblyCodeGen") {
     "WebAssemblyTargetMachine.cpp",
     "WebAssemblyTargetObjectFile.cpp",
     "WebAssemblyTargetTransformInfo.cpp",
-    "WebAssemblyUtilities.cpp",
   ]
 }
 

diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Disassembler/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Disassembler/BUILD.gn
index 8a86b67f8ae71..e78002eb27bec 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Disassembler/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Disassembler/BUILD.gn
@@ -15,6 +15,7 @@ static_library("Disassembler") {
     "//llvm/lib/Support",
     "//llvm/lib/Target/WebAssembly/MCTargetDesc",
     "//llvm/lib/Target/WebAssembly/TargetInfo",
+    "//llvm/lib/Target/WebAssembly/Utils",
   ]
   include_dirs = [ ".." ]
   sources = [ "WebAssemblyDisassembler.cpp" ]

diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/MCTargetDesc/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/MCTargetDesc/BUILD.gn
index 2249138e85c79..0fd628c69af93 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/MCTargetDesc/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/MCTargetDesc/BUILD.gn
@@ -13,7 +13,7 @@ tablegen("WebAssemblyGenMCCodeEmitter") {
 }
 
 tablegen("WebAssemblyGenRegisterInfo") {
-  visibility = [ ":MCTargetDesc" ]
+  visibility = [ ":tablegen" ]
   args = [ "-gen-register-info" ]
   td_file = "../WebAssembly.td"
 }
@@ -24,6 +24,17 @@ tablegen("WebAssemblyGenSubtargetInfo") {
   td_file = "../WebAssembly.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",
+    "../Utils",
+  ]
+  public_deps = [ ":WebAssemblyGenRegisterInfo" ]
+}
+
 static_library("MCTargetDesc") {
   output_name = "LLVMWebAssemblyDesc"
 
@@ -31,7 +42,7 @@ static_library("MCTargetDesc") {
   # by other targets. .inc files only used by .cpp files in this directory
   # should be in deps instead.
   public_deps = [
-    ":WebAssemblyGenRegisterInfo",
+    ":tablegen",
     ":WebAssemblyGenSubtargetInfo",
   ]
   deps = [
@@ -40,6 +51,7 @@ static_library("MCTargetDesc") {
     "//llvm/lib/MC",
     "//llvm/lib/Support",
     "//llvm/lib/Target/WebAssembly/TargetInfo",
+    "//llvm/lib/Target/WebAssembly/Utils",
   ]
   include_dirs = [ ".." ]
   sources = [

diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn
new file mode 100644
index 0000000000000..d9f36d240d83d
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/Utils/BUILD.gn
@@ -0,0 +1,19 @@
+static_library("Utils") {
+  output_name = "LLVMWebAssemblyUtils"
+  deps = [
+    "//llvm/lib/CodeGen",
+    "//llvm/lib/IR",
+    "//llvm/lib/MC",
+    "//llvm/lib/Support",
+
+    # MCTargetDesc depends on Utils, so we can't depend on the full
+    # MCTargetDesc target here: it would form a cycle.
+    "//llvm/lib/Target/WebAssembly/MCTargetDesc:tablegen",
+    "//llvm/lib/Target/WebAssembly/TargetInfo",
+  ]
+  include_dirs = [ ".." ]
+  sources = [
+    "WebAssemblyUtilities.cpp",
+    "WebAssemblyTypeUtilities.cpp",
+  ]
+}


        


More information about the llvm-commits mailing list