[LLVMbugs] [PATCH] Fix paths in Target.td

Chris Lattner sabre at nondot.org
Sat May 13 19:11:11 PDT 2006


On Sat, 13 May 2006, Vladimir Prus wrote:
> Hi,
> at the moment, Target.td uses "../Whatever.td" to refer to .td files in the
> same directory as Target.td itself, which is a bit strange.
> It works when building backends under lib/Target directory, but does not work
> when building a custom backend out-of-tree.

Ah, right.

> Attached patch teaches TableGen to look in including file's directory for
> includes, and removes "../" from includes in Target.td.

This is an interesting approach, but could you try changing 
llvm/Makefile.rules to define TableGen like this:

TableGen      = $(TBLGEN) -I $(PROJ_SRC_DIR) -I$(PROJ_SRC_ROOT)/include \
                           -I $(PROJ_SRC_ROOT)/lib/Target

That should work, and is simpler.  If it works, please let me know and 
I'll commit it.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-bugs mailing list