Skip to content

Commit

Permalink
[Build] Add rule to generate fully-expanded .td file
Browse files Browse the repository at this point in the history
I found it useful in the past and now again to have a version of the .td file
where all the records are expanded.  This adds a makefile rule to generate
this on demand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208056 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
anemet committed May 6, 2014
1 parent 40a1b74 commit f0e7f76
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -1713,8 +1713,14 @@ $(ObjDir)/%GenDFAPacketizer.inc.tmp : %.td $(ObjDir)/.dir $(LLVM_TBLGEN)
$(Echo) "Building $(<F) DFA packetizer tables with tblgen"
$(Verb) $(LLVMTableGen) -gen-dfa-packetizer -o $(call SYSPATH, $@) $<

# Dump all the records to <target>.td.expanded. This is useful for debugging.
$(TARGET:%=%.td.expanded): \
%.td.expanded : %.td $(LLVM_TBLGEN)
$(Echo) "Building a fully expanded version of $(<F)"
$(Verb) $(LLVMTableGen) -o $(call SYSPATH, $@) $<

clean-local::
-$(Verb) $(RM) -f $(INCFiles)
-$(Verb) $(RM) -f $(INCFiles) $(TARGET).td.expanded

endif # TARGET

Expand Down

0 comments on commit f0e7f76

Please sign in to comment.