File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
crates/cargo-codspeed/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,15 @@ impl BuildOptions<'_> {
115115 // Add debug info (equivalent to -g)
116116 rust_flags. push_str ( " -C debuginfo=2" ) ;
117117
118+ // Prevent debug info stripping
119+ // https://doc.rust-lang.org/cargo/reference/profiles.html#release
120+ // According to cargo docs, for release profile which we default to:
121+ // `strip = "none"` and `debug = false`.
122+ // In practice, if we set debug info through RUSTFLAGS, cargo still strips them, most
123+ // likely because debug = false in the release profile.
124+ // We also need to disable stripping through rust flags.
125+ rust_flags. push_str ( " -C strip=none" ) ;
126+
118127 // Add the codspeed cfg flag if instrumentation mode is enabled
119128 if measurement_mode == MeasurementMode :: Instrumentation {
120129 rust_flags. push_str ( " --cfg codspeed" ) ;
You can’t perform that action at this time.
0 commit comments