[llvm-commits] [llvm-gcc-4.2] r53113 - /llvm-gcc-4.2/trunk/gcc/config/darwin.h
Eric Christopher
echristo at apple.com
Mon Jul 7 10:48:02 PDT 2008
On Jul 7, 2008, at 10:19 AM, Evan Cheng wrote:
> It would be nice if someone with configure foo can help with this.
> Perhaps Eric?
Sure. There are a few ways you can go about this:
a) add a configure specific flag --enable-llvm-lto or something that
will be off
by default or something of that sort.
or (icky)
b) basically check for a version number of ld that will support the
flag. there are some examples in gcc/configure.ac that show how to do
this for gnu ld
or (preferred)
c) add support to ld to print out the command line options it
recognizes (--help maybe? -h?) and then use something simple like:
# Check if linker supports -mllvm
if $gcc_cv_ld --help 2>/dev/null | grep mllvm > /dev/null; then
gcc_cv_ld_llvm=yes
fi
You'll need a little more wrapper around that, but this last is the
easiest way to go if someone bugs Nick to put option listing support in.
-eric
More information about the llvm-commits
mailing list