[LLVMdev] Best location for testing-type tools?

Marshall Clow mclow.lists at gmail.com
Fri Jun 22 12:13:41 PDT 2012


So, I've written a tool called "obj2yaml". It takes an object file (currently just COFF), and dumps out a textual representation.
Micheal Spencer has written a companion tool (not yet landed) called "yaml2obj".

The primary use for these tools is for generating test cases for lld, though they are general purpose tools, and can be used to generate test cases (or debug) other parts of llvm.

I put obj2yaml into the "utils" directory, and (I thought) all was well.

However, this morning, I noticed that it was not getting built in the configure+make build, just the cmake build.

So, I checked in revision r159014, which added a reference to obj2yaml in the Makefile for /utils. Tested it, and all was well (I thought).

I was wrong. Lots of buildbots failed, all saying (more or less):

> make[3]: *** No rule to make target `/Volumes/Macintosh_HD2/buildbots/clang-x86_64-darwin11-self-mingw32/llvm.obj/BuildTools/Debug+Asserts/lib/libLLVMObject.a', needed by `/Volumes/Macintosh_HD2/buildbots/clang-x86_64-darwin11-self-mingw32/llvm.obj/BuildTools/Debug+Asserts/bin/obj2yaml'.  Stop.

I asked in the chat room:
> 	marshall:So - what do I link with to get llvm::object::COFFObjectFile ?
> 	d0k:libobject, but I don't think that's accessible from utils/

And I have no reason to doubt him.

> 	grosbach:marshall: perhaps the tool should be in 'tools' not 'utils'?

That sounds reasonable, but it appears to me that all the bits from 'tools' get installed on end-users systems, and I don't think that obj2yaml really deserves that.

So - my question is:
	Where should this tool live?

-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the llvm-dev mailing list