rust 代码生成选项
Available codegen options:
-C ar=val -- this option is deprecated and does nothing
-C linker=val -- system linker to link outputs with
-C link-arg=val -- a single extra argument to append to the linker invocation (can be used several times)
-C link-args=val -- extra arguments to append to the linker invocation (space separated)
-C link-dead-code -- don't let linker strip dead code (turning it on can be used for code coverage)
-C lto=val -- perform LLVM link-time optimizations
-C target-cpu=val -- select target processor (`rustc --print target-cpus` for details)
-C target-feature=val -- target specific attributes. (`rustc --print target-features` for details). This feature is unsafe.
-C passes=val -- a list of extra LLVM passes to run (space separated)
-C llvm-args=val -- a list of arguments to pass to LLVM (space separated)
-C save-temps -- save all temporary output files during compilation
-C rpath -- set rpath values in libs/exes
-C overflow-checks=val -- use overflow checks for integer arithmetic
-C no-prepopulate-passes -- don't pre-populate the pass manager with a list of passes
-C no-vectorize-loops -- don't run the loop vectorization optimization passes
-C no-vectorize-slp -- don't run LLVM's SLP vectorization pass
-C soft-float -- use soft float ABI (*eabihf targets only)
-C prefer-dynamic -- prefer dynamic linking to static linking
-C no-integrated-as -- use an external assembler rather than LLVM's integrated one
-C no-redzone=val -- disable the use of the redzone
-C relocation-model=val -- choose the relocation model to use (`rustc --print relocation-models` for details)
-C code-model=val -- choose the code model to use (`rustc --print code-models` for details)
-C metadata=val -- metadata to mangle symbol names with
-C extra-filename=val -- extra data to put in each output filename
-C codegen-units=val -- divide crate into N units to optimize in parallel
-C remark=val -- print remarks for these optimization passes (space separated, or "all")
-C no-stack-check -- the `--no-stack-check` flag is deprecated and does nothing
-C debuginfo=val -- debug info emission level, 0 = no debug info, 1 = line tables only, 2 = full debug info with variable and type information
-C opt-level=val -- optimize with possible levels 0-3, s, or z
-C force-frame-pointers=val -- force use of the frame pointers
-C debug-assertions=val -- explicitly enable the `cfg(debug_assertions)` directive
-C inline-threshold=val -- set the threshold for inlining a function (default: 225)
-C panic=val -- panic strategy to compile crate with
-C incremental=val -- enable incremental compilation
-C default-linker-libraries=val -- allow the linker to link its default libraries
-C linker-flavor=val -- linker flavor
-C linker-plugin-lto=val -- generate build artifacts that are compatible with linker-based LTO.
-C profile-generate=val -- compile the program with profiling instrumentation
-C profile-use=val -- use the given `.profdata` file for profile-guided optimization
学习了一下rustc, 了解到这个编译器仅仅是编译rs代码,将代码转成llvm可以编译的中间代码。 也就是说llvm支持多少架构,它就支持多少架构。
比如要生成可以调试的二进制代码:
rustc src/hello.rs -C debuginfo=2 -o hello_debug
这样就可以调试了。
通过rustc编译出的可以执行文件,反汇编出来的东东有点晦涩难懂
rust 代码生成选项的更多相关文章
- gcc总结【基本用法】【选项】【动静态库】(转)
1.////////////////////////////////////////////////////////////////////////////////////////////////// ...
- nvcc编译器选项及配置
nvcc命令选项: 选项命令有长名和短名,通常我们使用是用短名,长名主要用于描述. 1.指定编译阶段 主要指定编译的阶段以及要编译的输入文件. -cuda -cubin -fatbin -ptx ...
- 常用gcc选项
<Linux GCC常用命令> Makefile有三个非常有用的变量.分别是$@,$^,$<代表的意义分别是: $@--目标文件,$^--所有的依赖文件,$<--第一个依赖文件 ...
- 【转载】 GNU GCC 选项说明
GCC 1 Section: GNU Tools (1) Updated: 2003/12/05 Sponsor: GCC Casino Winning Content NAME gcc,g++-GN ...
- 编译-O 选项对性能提升作用
GCC -O 选项 这个选项控制所有的优化等级.使用优化选项会使编译过程耗费更多的时间,并且占用更多的内存,尤其是在提高优化等级的时候. -O设置一共有五种:-O0.-O1.-O2.-O3和-Os. ...
- gcc/g++ -O 优化选项说明
查查gcc手册就知道了,每个编译选项都控制着不同的优化选项 下面从网络上copy过来的,真要用到这些还是推荐查阅手册 -O设置一共有五种:-O0.-O1.-O2.-O3和-Os. 除了-O0以外,每一 ...
- ent 基本使用九 代码生成
ent 提供了cli 工具,可以方便我们进行schema 以及代码生成,同时目前提供的cli已经够用了 安装 cli go get github.com/facebookincubator/ent/c ...
- 【转帖】编译-O 选项对性能提升作用
编译-O 选项对性能提升作用 https://www.cnblogs.com/pigerhan/p/3526889.html GCC -O 选项 这个选项控制所有的优化等级.使用优化选项会使编译过程耗 ...
- LLBL Gen Pro 5.0 企业应用开发入门
Solutions Design 公司于2016年5月发布了LLBL Gen Pro 5.0,这个新版本的发布出乎于我的意料.我的猜想是从4.2升级到4.5,再升级5.x版本,主版本号的变更会给原有客 ...
随机推荐
- 二,文件上传控件el-upload
需求: 上传文件,保存到服务器,并保存历史记录 上效果图 <el-form-item label="文件"> <el-upload ref="uploa ...
- HTML开发实例-简单相亲网站开发(主体为table)
实现功能:简单的相亲网站: 清楚不常在,抓紧谈恋爱 我承诺 年满十八岁 单身 抱着严肃态度 寻找真诚的另一半 性别: 男 女 生日: --请选择年-- 2019 2020 2021 --请选择月-- ...
- [Chrome插件开发]001.入门
Chrome插件开发入门 Chrome扩展文件 Browser Actions(扩展图标) Page Actions(地址栏图标) popup弹出窗口 Background Pages后台页面 实战讲 ...
- java 单列集合总结
Collection 接口 add() remove() contains() clear(); size(); 迭代器遍历(普通迭代器,不能再遍历过程中修改集合的长度) List接口 单列集合 有序 ...
- [05]HTML基础之表格标签
1. <table>标签 表格容器,尽量避免用属性书写样式,而是用CSS来表达 border: 数字 //表格边框宽度 2. <caption>标签 表格的标题,一般出现在表格 ...
- Spring boot Sample 001之spring-boot-begin-hello
一.环境 1.1.Idea 2020.1 1.2.JDK 1.8 二.目的 初识Spring Boot 三.步骤 3.1.点击File -> New Project -> Spring I ...
- Rocket - devices - TLDeadlock
https://mp.weixin.qq.com/s/Zv4HE7zMBzHbsWGg3pa9fg 简单介绍TLDeadlock的实现. 1. TLDeadlock TLDeadlock是抽象类Dev ...
- PowerPC-关闭中断后,还能报sc中断?
https://mp.weixin.qq.com/s/OsHIfPzYUagaTe5J88dIIg 一. 基本问题 FreeRTOS有一个宏,portYIELD_WITHIN_API(), 意 ...
- jchdl - GSL实例 - DFlipFlop(D触发器)
https://mp.weixin.qq.com/s/7N3avTxTd2ZUnAcKg4w3Ig D触发器对边沿敏感,只有当相应的边沿出现时,才会触发D的值传播到输出Q. 引自:htt ...
- DOM表单,下拉菜单和表格
DOM访问表单控件的常用属性和方法如下: action 返回该表单的提交地址 elements 返回表单内全部表单控件所组成的数组,通过数组可以访问表单内的任何表单控件. length 返回表单内表单 ...