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版本,主版本号的变更会给原有客 ...
随机推荐
- 【HTTP】Web及网络基础&HTTP基础
HTTP协议访问Web 一.大体访问过程 1. 浏览器地址栏输入URL 2. 浏览器从服务端获取文件资源 3. 浏览器显示Web页面 二.HTTP的版本历史 1. HTTP/0.9 没有作为正式的标准 ...
- iOS开发添加新手引导
往往项目中经常出现此类需求 用户通过点击引导按钮可响应页面附带按钮的点击事件. // // gzhGuideView.h // GuideView // // Created by 郭志贺 on 20 ...
- require.js与IDEA的配合
本文主要讲述在html中使用requirejs时,如何让IDEA更加智能识别javascript的方法. 测试时的目录结构,一种典型的 thinkphp 的结构,同时,在 a.thml 中通过 req ...
- vivo产能问题
生产手机,第一天量产1台,接下来2天(即第二.三天)每天量产2件,接下来3天(即第四.五.六天)每天量产3件 ... ... 以此类推,请编程计算出第n天总共可以量产的手机数量. public int ...
- 如何基于 echarts 在柱状图或条形图上实现转换率?(有想法吗?)
目录 需求 探索一 探索二 探索三 转换实践思路1 转换实践思路2 其他思路 探索四(揭晓答案) 答案篇说明 backgroundColor 用法 双柱合一 始终在轴的中间 百分在变,但是距离轴的距离 ...
- Bitwarden_rs搭建
最近LastPass网络极其不稳定,正好闲下来找到了Bitwarden_rs这个替代品,感觉不错,分享记录下部署过程. 一.Docker方式部署 #获取镜像 docker pull bitwarden ...
- 【HIVE】(1)建表、导入数据、外部表、导出数据
导入数据 1). 本地 load data local inpath "/root/example/hive/data/dept.txt" into table dept; 2). ...
- Java实现 蓝桥杯 历届试题 核桃的数量
历届试题 核桃的数量 时间限制:1.0s 内存限制:256.0MB 问题描述 小张是软件项目经理,他带领3个开发组.工期紧,今天都在加班呢.为鼓舞士气,小张打算给每个组发一袋核桃(据传言能补脑).他的 ...
- Java实现LeetCode_0012_IntegerToRoman
package javaLeetCode.primary; import java.util.Scanner; public class IntegerToRoman_12 { public stat ...
- Java实现 蓝桥杯 历届试题 城市建设
问题描述 栋栋居住在一个繁华的C市中,然而,这个城市的道路大都年久失修.市长准备重新修一些路以方便市民,于是找到了栋栋,希望栋栋能帮助他. C市中有n个比较重要的地点,市长希望这些地点重点被考虑.现在 ...