What do the optimization levels `-Os` and `-Oz` do in rustc?

大憨熊 提交于 2019-12-01 02:44:11
Englund

It seems like you are not the only one confused, as described in a Rust issue. It seems to follow the same pattern as Clang:

  • Os For optimising the size when compiling.
  • Oz For even more size optimisation.
red75prime

Looking at these and these lines in Rust's source code, I can say that s means optimize for size, and z means optimize for size some more.

All optimizations seem to be performed by the LLVM code-generation engine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!