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

Vladimir Prus ghost at cs.msu.su
Mon May 15 23:29:25 PDT 2006


On Sunday 14 May 2006 06:11, Chris Lattner wrote:
> 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.

Here's a revised version of the patch using the approach you've suggested. I 
did a rebuild with it, and things seem to work fine. Ok to commit?

- Volodya
-------------- next part --------------
A non-text attachment was scrubbed...
Name: relative_paths_2.diff
Type: text/x-diff
Size: 1525 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20060516/4956c074/attachment.diff>


More information about the llvm-bugs mailing list