LLVM:适用于 Windows 的 llvm-gcc (mingw) 位码
我目前正在构建一个小型 JIT 编译器。 对于该语言,我需要一个用于某些特殊数学函数的运行时库。 我认为最好的方法是将库编译为位码并链接它。 编译器应该集成在产品中,因此它必须在Windows(VC10,64位)下工作。
那么是否可以使用 mingw llvm-gcc 构建数学库,然后将其与 JIT 代码建立链接? 或者在 mingw 下使用 llvm-gcc 构建位码的可移植性是否存在任何问题? 如果出现问题,您会建议什么解决方案?
i'm currently building a small JIT compiler.
For the language I need a runtime library for some special math functions.
I think the best would be to compile the lib to bitcode and link it.
The compiler should be integrated in a product and as of this, it must work under windows (VC10, 64bit).
So is it possible to build the math lib with the mingw llvm-gcc build an link it later with the JITed Code?
Or are there any problems regarding the portability of the bitcode build with llvm-gcc under mingw?
If there are problems, what solution would you suggest?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
位码采用可移植格式(至少具有相同的架构); Windows 中生成的位码与 Linux 或 Cygwin 等中生成的位码没有区别。
Bitcode is in a portable format (at least given the same architecture); there is no difference between bitcode generated in Windows and bitcode generated in, for example, Linux or Cygwin.