[llvm-dev] Compile assembly to llvm bitcode
Anahit Hayrapetyan via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 17 02:06:47 PST 2020
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200217/d58bc3d9/attachment-0001.html>
More information about the llvm-dev
mailing list