简体   繁体   English

如何在 rustc 中使用 gcc 标志

[英]How to use a gcc flag in rustc

I am trying to run a Rust program on a powerpc arch.我正在尝试在 powerpc 架构上运行 Rust 程序。

When I build my code in C I use the flag -mlongcall.当我在 C 中构建代码时,我使用标志 -mlongcall。

I am trying to understand how can I use the "-mlongcall" flag in my rust build.我试图了解如何在我的 rust 构建中使用“-mlongcall”标志。 In general, it would be nice to know if I can use flags that I know from gcc in my Rust build.一般来说,很高兴知道我是否可以在我的 Rust 构建中使用我从 gcc 中知道的标志。

The solution for the -mlongcall flag is to use the flag: -Ctarget-features=+longcall as suggested in this issue: add mlongcall flag to rustc -mlongcall 标志的解决方案是使用标志: -Ctarget-features=+longcall如本期建议:将 mlongcall 标志添加到 rustc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM