Hello, I have looked around the LLVM documentation, and tried to experiment with static compilation. So far It appears as though the assembly file is only compatible with GCC. When I use llvm-ld it also appears to use GCC. Is there any other assembler or compiler that can statically compile LLVM output? Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090408/b132be2e/attachment.html>
Bill Wendling
2009-Apr-08 20:28 UTC
[LLVMdev] Native Static Compilers Compatible with LLVM
If you're generating a .s file for X86, you can specify the flavor of
assembly language on the command line like this:
llvm-gcc ... -mllvm -x86-asm-syntax=[att|intel]
Here's the relevant lines in the llc -help:
...
-x86-asm-syntax - Choose style of code to emit
from X86 backend:
=att - Emit AT&T-style assembly
=intel - Emit Intel-style assembly
Other than that, the assembly isn't really GCC-specific. Any assembler
that can understand the different assembly language syntaxes should
work.
-bw
On Wed, Apr 8, 2009 at 1:15 PM, Bot Tiger <bottiger1 at gmail.com>
wrote:> Hello,
>
> I have looked around the LLVM documentation, and tried to experiment with
> static compilation.
>
> So far It appears as though the assembly file is only compatible with GCC.
>
> When I use llvm-ld it also appears to use GCC.
>
> Is there any other assembler or compiler that can statically compile LLVM
> output?
>
> Thank you.
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
Anton Korobeynikov
2009-Apr-08 20:57 UTC
[LLVMdev] Native Static Compilers Compatible with LLVM
> If you're generating a .s file for X86, you can specify the flavor of > assembly language on the command line like this: > > llvm-gcc ... -mllvm -x86-asm-syntax=[att|intel] > > Here's the relevant lines in the llc -help: > > ... > -x86-asm-syntax - Choose style of code to emit > from X86 backend: > =att - Emit AT&T-style assembly > =intel - Emit Intel-style assemblyInitially it was thought to emit assembler compatible with MASM. However, MASM is too weak to assemble something needed, for example, for more or less non-trivial C++ (and sometimes even C!) source. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University