[LLVMdev] [OT] GCC specs language and adding options

Aaron Gray aaronngray.lists at googlemail.com
Wed Sep 16 13:28:55 PDT 2009


Hi,
I have been trying to get to grips with GCC's specs language in order to add
COFF and ELF emission options.

I have noticed that the '-emit-llvm-bc' option does not appear to work at
all either with -S or without, giving :-

    llvm-gcc: unrecognized option '-emit-llvm-bc'

Also this seems by default seems for '-emit-llvm' to produce a '.o' file
instead of a '.bc' file extension, unless using a '-o' option and overriding
the filename.

The LLVM code is as follows :-

"%{O4|emit-llvm|flto:%{S:-emit-llvm} %{!S:-emit-llvm-bc %{c: %W{o*} %{!o*:-o
%b%w.o}} %{!c:-o %d%w%u%O}}}"

So we have '-O4', '-emit-llvm', and '-flto' equivalent options.

What I out like is either a '-emit-llvm-coff' and '-emit-llvm-elf' or
ideally an '-emit-llvm=coff' if this can be done transparently with an
'-emit-llvm' functioning normally.

Any Help welcome !

Many thanks in advance,

Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090916/699f8570/attachment.html>


More information about the llvm-dev mailing list