LLVM:适用于 Windows 的 llvm-gcc (mingw) 位码

发布于 2024-08-31 19:43:34 字数 235 浏览 10 评论 0原文

我目前正在构建一个小型 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眉目亦如画i 2024-09-07 19:43:34

位码采用可移植格式(至少具有相同的架构); 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文