Randall via llvm-dev
2016-Apr-13 09:57 UTC
[llvm-dev] Can a bc file generated by the windows version llvm run with the linux version llvm?
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160413/2c66f07a/attachment.html>
Bruce Hoult via llvm-dev
2016-Apr-13 12:00 UTC
[llvm-dev] Can a bc file generated by the windows version llvm run with the linux version llvm?
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>