[llvm-dev] Compile assembly to llvm bitcode
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Tue Feb 18 09:27:28 PST 2020
There's no compiler driver support for that task, no.
Why are you trying to compile everything to bitcode/link them together in
that way? (might be other solutions to consider)
On Mon, Feb 17, 2020 at 6:13 PM Anahit Hayrapetyan via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Hi all,
>
> Is it possible to compile assembler source code to llvm bitcode? And if
> yes, then how?
>
> I’m trying to compile a project to llvm bitcode. The project has both C
> (.c) sources and some assembly(.S) sources. The make compiles all sources
> to object (.o) files and then links them together. What I’m trying to do is
> replace all commands compiling to .o with ‘clang -c -emit-llvm ...’ to get
> bitcodes and then use “llvm-link” to link them together in one .bc. However
> the llvm-link fails as the bitcodes I got from .s files are not recognized
> as llvm bitcodes (the header does not correspond to llvm bitcode header).
>
> Best,
> Anahit.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200218/13f0e195/attachment.html>
More information about the llvm-dev
mailing list