Skip to content

Commit

Permalink
Enable debug info for dev profile build dependencies
Browse files Browse the repository at this point in the history
Cargo now [turns off debug symbols for build dependencies by
default][1], but that doesn't allow us to reuse those built
dependencies when building a proc-macro.

Fixes #928

[1]: rust-lang/cargo#11252
  • Loading branch information
shepmaster committed May 4, 2023
1 parent b2a85c5 commit cbebb66
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions top-crates/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct TomlPackage {
#[serde(rename_all = "kebab-case")]
struct BuildOverride {
codegen_units: u32,
debug: bool,
}

/// A profile section in a Cargo.toml file
Expand Down Expand Up @@ -71,12 +72,12 @@ fn main() {
dev: Profile {
codegen_units: 1,
incremental: false,
build_override: BuildOverride { codegen_units: 1 },
build_override: BuildOverride { codegen_units: 1, debug: true },
},
release: Profile {
codegen_units: 1,
incremental: false,
build_override: BuildOverride { codegen_units: 1 },
build_override: BuildOverride { codegen_units: 1, debug: false },
},
},
dependencies: dependencies.clone(),
Expand Down

0 comments on commit cbebb66

Please sign in to comment.