Skip to content

Commit

Permalink
update doc of compile options
Browse files Browse the repository at this point in the history
  • Loading branch information
vita-dounai committed Sep 23, 2020
1 parent b8a36a1 commit 67e1a26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/in_depth/compile_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ overflow-checks = true

- `lto = true`,用于开启链接时优化(Link Time Optimization)。开启后链接器将会对整个合约进行分析并进行跨模块的优化,有助于减少合约字节码的体积。

- `opt-level = "z"`,用于指定编译器的优化等级,`z`级别的优化将会更专注于缩小字节码的体积
- `opt-level = "z"`,用于指定编译器的优化等级,`z`级别的优化将会在优化性能的同时专注于缩小字节码的体积

- `overflow-checks = true`,用于开启算数溢出检查。开启后,Rust编译器会在代码中每一处执行算数运算的地方插入溢出检查代码。当合约的运算过程中出现算数溢出时,会直接引发panic。关闭该选项能够获得更快的执行速度和更小的字节码体积,但是也会让您的合约处于风险之中。

Expand Down

0 comments on commit 67e1a26

Please sign in to comment.