【发布时间】:2017-06-14 16:23:07
【问题描述】:
我经常想用debug = true 在发布模式下编译,这样我可以更轻松地阅读生成的程序集。我目前正在这样做:
[profile.release]
debug = true
但我不希望在我的最终发布版本中有任何调试符号。我想做类似的事情:
[profile.custom]
debug = true
opt-level = 3
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'unwind'
然后运行
cargo build --custom
我已阅读the documentation 无济于事。
【问题讨论】:
-
您可以创建一个自定义 Cargo.toml 并像这样使用它:
cargo build --manifest-path ./Cargo-custom.toml。但它要求您在两个文件中指定依赖项。
标签: rust rust-cargo