allow to set line-directives-only too
This commit is contained in:
parent
3ea7cf5383
commit
1d929cf8b7
@ -517,11 +517,8 @@
|
|||||||
#overflow-checks-std = rust.overflow-checks (boolean)
|
#overflow-checks-std = rust.overflow-checks (boolean)
|
||||||
|
|
||||||
# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
|
# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
|
||||||
# `0` - no debug info
|
# See https://doc.rust-lang.org/rustc/codegen-options/index.html#debuginfo for available options.
|
||||||
# `1` - line tables only - sufficient to generate backtraces that include line
|
#
|
||||||
# information and inlined functions, set breakpoints at source code
|
|
||||||
# locations, and step through execution in a debugger.
|
|
||||||
# `2` - full debug info with variable and type information
|
|
||||||
# Can be overridden for specific subsets of Rust code (rustc, std or tools).
|
# Can be overridden for specific subsets of Rust code (rustc, std or tools).
|
||||||
# Debuginfo for tests run with compiletest is not controlled by this option
|
# Debuginfo for tests run with compiletest is not controlled by this option
|
||||||
# and needs to be enabled separately with `debuginfo-level-tests`.
|
# and needs to be enabled separately with `debuginfo-level-tests`.
|
||||||
|
@ -55,6 +55,7 @@ pub enum DryRun {
|
|||||||
pub enum DebuginfoLevel {
|
pub enum DebuginfoLevel {
|
||||||
#[default]
|
#[default]
|
||||||
None,
|
None,
|
||||||
|
LineDirectivesOnly,
|
||||||
LineTablesOnly,
|
LineTablesOnly,
|
||||||
Limited,
|
Limited,
|
||||||
Full,
|
Full,
|
||||||
@ -72,6 +73,9 @@ fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
|||||||
Ok(match Deserialize::deserialize(deserializer)? {
|
Ok(match Deserialize::deserialize(deserializer)? {
|
||||||
StringOrInt::String(s) if s == "none" => DebuginfoLevel::None,
|
StringOrInt::String(s) if s == "none" => DebuginfoLevel::None,
|
||||||
StringOrInt::Int(0) => DebuginfoLevel::None,
|
StringOrInt::Int(0) => DebuginfoLevel::None,
|
||||||
|
StringOrInt::String(s) if s == "line-directives-only" => {
|
||||||
|
DebuginfoLevel::LineDirectivesOnly
|
||||||
|
}
|
||||||
StringOrInt::String(s) if s == "line-tables-only" => DebuginfoLevel::LineTablesOnly,
|
StringOrInt::String(s) if s == "line-tables-only" => DebuginfoLevel::LineTablesOnly,
|
||||||
StringOrInt::String(s) if s == "limited" => DebuginfoLevel::Limited,
|
StringOrInt::String(s) if s == "limited" => DebuginfoLevel::Limited,
|
||||||
StringOrInt::Int(1) => DebuginfoLevel::Limited,
|
StringOrInt::Int(1) => DebuginfoLevel::Limited,
|
||||||
@ -98,6 +102,7 @@ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|||||||
use DebuginfoLevel::*;
|
use DebuginfoLevel::*;
|
||||||
f.write_str(match self {
|
f.write_str(match self {
|
||||||
None => "0",
|
None => "0",
|
||||||
|
LineDirectivesOnly => "line-directives-only",
|
||||||
LineTablesOnly => "line-tables-only",
|
LineTablesOnly => "line-tables-only",
|
||||||
Limited => "1",
|
Limited => "1",
|
||||||
Full => "2",
|
Full => "2",
|
||||||
|
Loading…
Reference in New Issue
Block a user