[cfe-dev] Implementation of stdbool.h
Chris Lattner
clattner at apple.com
Thu Feb 28 09:47:02 PST 2008
On Feb 27, 2008, at 10:07 PM, Eli Friedman wrote:
> Per title, this is an implementation of stdbool.h, to start off the
> project of clang getting its own headers.
Nice!
> I picked stdbool.h because
> it is one of the simplest standard headers, being that it only has
> four straightforward macros. It would be embarrassing if I screwed it
> up somehow :)
Hehe. :) It would be really nice to support C++, since clang does
support bool in C++ already. I think this just amounts to wrapping
the #defines with "#ifndef __cplusplus".
> I'm not completely sure if I got the license part right... is some
> sort of special exception needed in the headers so programs compiled
> with clang aren't under the clang license?
Please use the MIT license instead of the LLVM license for the
header. There was some discussion of this a couple months ago, here
are some links:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2007-December/000619.html
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2007-December/000640.html
> sabre indicated on IRC that he might get the build system and driver
> and whatnot setup for clang to have its own headers sometime in the
> near future, so I prepared this to allow for testing.
I'll see what I can do. Does anyone know a good way to find a path
relative to the executable? Ideally I'd like to have "make install"
install a file system like:
<prefix>/bin/clang
<prefix>/include/clang/stdbool.h
etc.
and have the build tree look like (note the similarity :) :
llvm/Debug/bin/clang
llvm/Debug/include/clang/stdbool.h
The best way I know that avoids having to hard code the prefix into
the executable is by making clang search the "../include/clang" path
from its executable. Is there a good way to do this?
-Chris
More information about the cfe-dev
mailing list