[llvm] 45cc2a1 - [gn] port 12a8bc0 more

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 05:48:56 PST 2024


Author: Nico Weber
Date: 2024-01-25T08:48:22-05:00
New Revision: 45cc2a19cad7c3b180da67a27199fb5a1e17a71f

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

LOG: [gn] port 12a8bc0 more

The test reaches into internal headers. Make sure generated files
are ready for that.

(This is the only place. If there were more, we should use public_deps
instead.)

Added: 
    

Modified: 
    llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
    llvm/utils/gn/secondary/llvm/unittests/Target/RISCV/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
index 01bb5e54bd5dba..43eaa72047e659 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
@@ -15,7 +15,10 @@ tablegen("RISCVGenCompressInstEmitter") {
 }
 
 tablegen("RISCVGenMacroFusion") {
-  visibility = [ ":LLVMRISCVCodeGen" ]
+  visibility = [
+    ":LLVMRISCVCodeGen",
+    "//llvm/unittests/Target/RISCV:RISCVTests",
+  ]
   args = [ "-gen-macro-fusion-pred" ]
   td_file = "RISCV.td"
 }

diff  --git a/llvm/utils/gn/secondary/llvm/unittests/Target/RISCV/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Target/RISCV/BUILD.gn
index d59575d1d03097..25dd29143a1401 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/Target/RISCV/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/Target/RISCV/BUILD.gn
@@ -4,6 +4,10 @@ unittest("RISCVTests") {
   deps = [
     "//llvm/lib/MC",
     "//llvm/lib/Target/RISCV:LLVMRISCVCodeGen",
+
+    # RISCVInstrInfoTest.cpp includes the internal header RISCVSubtarget.h,
+    # which includes the generated file RISCVGenMacroFusion.inc.
+    "//llvm/lib/Target/RISCV:RISCVGenMacroFusion",
     "//llvm/lib/Target/RISCV/MCTargetDesc",
     "//llvm/lib/Target/RISCV/TargetInfo",
     "//llvm/lib/TargetParser",


        


More information about the llvm-commits mailing list