[llvm-dev] Can a bc file generated by the windows version llvm run with the linux version llvm?

Bruce Hoult via llvm-dev llvm-dev at lists.llvm.org
Wed Apr 13 05:00:22 PDT 2016

LLVM IR is machine-independent. That doesn't mean it is portable between
different environments.

Things that can make an IR file not portable between different OSes include:

- different sizes or alignments for data types
- different struct layout and padding, even for structs declared
identically in C
- different encoded names of C or C++ functions from external libraries
(even as simple as _ or not)
- different values for #defines and enums from system headers
- completely different members, layout, sizes in structs from system headers

On Wed, Apr 13, 2016 at 9:57 PM, Randall via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> I generated a bc with a windows version llvm, and wanted to run it with a
> linux version llvm. However,  it can’t.
> LLVM IR has a unify format, doesn’t it? why can’t a bc file be recognized
> by llvm backend?
> Thank you.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://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/20160414/bbc0f7c1/attachment.html>

More information about the llvm-dev mailing list