如何从货运中发出LLVM-IR [英] How to emit LLVM-IR from Cargo

查看:105
本文介绍了如何从货运中发出LLVM-IR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为我的项目获取货物以发出LLVM-IR而不是二进制文件?我知道您可以在rustc中使用--emit=llvm-ir标志,但是我已经阅读了一些Github问题,这些问题表明不可能将任意的编译器标志传递给货物.

How can I get cargo to emit LLVM-IR instead of a binary for my project? I know that you can use the --emit=llvm-ir flag in rustc, but I've read some Github issues that show it's impossible to pass arbitrary compiler flags to cargo.

有什么办法可以让我的货物直接发射LLVM-IR?

Is there any way I can get cargo to emit LLVM-IR directly?

推荐答案

cargo rustc可以通过Cargo将任意编译器标志传递给rustc.所以我认为:

There is cargo rustc to pass arbitrary compiler flags through Cargo to rustc. So I think:

cargo rustc -- --emit=llvm-ir

是您想要的!

这篇关于如何从货运中发出LLVM-IR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆