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 代码生成选项的更多相关文章

  1. gcc总结【基本用法】【选项】【动静态库】(转)

    1.////////////////////////////////////////////////////////////////////////////////////////////////// ...

  2. nvcc编译器选项及配置

    nvcc命令选项: 选项命令有长名和短名,通常我们使用是用短名,长名主要用于描述. 1.指定编译阶段 主要指定编译的阶段以及要编译的输入文件. -cuda  -cubin  -fatbin  -ptx ...

  3. 常用gcc选项

    <Linux GCC常用命令> Makefile有三个非常有用的变量.分别是$@,$^,$<代表的意义分别是: $@--目标文件,$^--所有的依赖文件,$<--第一个依赖文件 ...

  4. 【转载】 GNU GCC 选项说明

    GCC 1 Section: GNU Tools (1) Updated: 2003/12/05 Sponsor: GCC Casino Winning Content NAME gcc,g++-GN ...

  5. 编译-O 选项对性能提升作用

    GCC -O 选项 这个选项控制所有的优化等级.使用优化选项会使编译过程耗费更多的时间,并且占用更多的内存,尤其是在提高优化等级的时候. -O设置一共有五种:-O0.-O1.-O2.-O3和-Os. ...

  6. gcc/g++ -O 优化选项说明

    查查gcc手册就知道了,每个编译选项都控制着不同的优化选项 下面从网络上copy过来的,真要用到这些还是推荐查阅手册 -O设置一共有五种:-O0.-O1.-O2.-O3和-Os. 除了-O0以外,每一 ...

  7. ent 基本使用九 代码生成

    ent 提供了cli 工具,可以方便我们进行schema 以及代码生成,同时目前提供的cli已经够用了 安装 cli go get github.com/facebookincubator/ent/c ...

  8. 【转帖】编译-O 选项对性能提升作用

    编译-O 选项对性能提升作用 https://www.cnblogs.com/pigerhan/p/3526889.html GCC -O 选项 这个选项控制所有的优化等级.使用优化选项会使编译过程耗 ...

  9. LLBL Gen Pro 5.0 企业应用开发入门

    Solutions Design 公司于2016年5月发布了LLBL Gen Pro 5.0,这个新版本的发布出乎于我的意料.我的猜想是从4.2升级到4.5,再升级5.x版本,主版本号的变更会给原有客 ...

随机推荐

  1. Jumpserver-跳板机的搭建

    Jumpserver堡垒机 一.Jumpserver堡垒机概述-部署Jumpserver运行环境 01 跳板机概述 跳板机就是一台服务器,开发或运维人员在维护过程中首先要统一登录到这台服务器,然后再登 ...

  2. 记录我在Docker 中一步一步搭建Mysql 数据库存开发环境

    准备在docker下来搭建mysql开发环境玩玩,当作学习笔记.搭建环境是:win10 企业版,docker desktop 19.03.8,mysql 5.7,Windows PowerShell ...

  3. json数据写入hbase

    package main.scala.com.web.zhangyong168.cn.spark.java; import org.apache.hadoop.hbase.HBaseConfigura ...

  4. [PHP自动化-进阶]002.CURL模拟登录带有验证码的网站

    引言:继前文<模拟登录并采集数据>,大家似乎看不过瘾,这会再出一发,模拟实现带验证码网站的登录. 这篇文章主要介绍了PHP使用CURL实现对带有验证码的网站进行模拟登录的方法,可以帮助读者 ...

  5. CORS漏洞利用检测和利用方式

    CORS全称Cross-Origin Resource Sharing, 跨域资源共享,是HTML5的一个新特性,已被所有浏览器支持,不同于古老的jsonp只能get请求. 检测方式: 1.curl访 ...

  6. Redis详解(十一)------ 过期删除策略和内存淘汰策略

    在介绍这篇文章之前,我们先来看如下几个问题: ①.如何设置Redis键的过期时间? ②.设置完一个键的过期时间后,到了这个时间,这个键还能获取到么?假如获取不到那这个键还占据着内存吗? ③.如何设置R ...

  7. 【朝夕专刊】RabbitMQ消息的持久化优先级

    欢迎大家阅读<朝夕Net社区技术专刊> 我们致力于.NetCore的推广和落地,为更好的帮助大家学习,方便分享干货,特创此刊!很高兴你能成为忠实读者,文末福利不要错过哦! 上篇文章介绍了R ...

  8. 判断IP地址的合法性

    每台计算机都有独一无二的编号,称为ip地址,每个合法的ip地址由‘.’分隔开的4个数字组成,每个数字的取值范围为0--255 输入一个字符串,判断其是否为合法的IP地址,若是输出‘YES’,否则输出‘ ...

  9. 移动端border:1px问题解决方案

    了解设备像素和css像素的因该知道,通常我们在写移动端时,是按照设计稿标注的像素除以设备的DPR来写真实的像素, 比如在iPhone6上,我们写的20px字体世界上在视觉效应上有20px; 所以当我们 ...

  10. Java实现 蓝桥杯VIP 算法训练 递归求二进制表示位数

    问题描述 给定一个十进制整数,返回其对应的二进制数的位数.例如,输入十进制数9,其对应的二进制数是1001,因此位数是4. 样例输入 一个满足题目要求的输入范例. 9 样例输出 与上面的样例输入对应的 ...