File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/cargo/ops/cargo_compile Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1284,8 +1284,9 @@ fn traverse_and_share(
1284
1284
let mut profile = unit. profile . clone ( ) ;
1285
1285
1286
1286
// If this is a build dependency, and it's not shared with runtime dependencies, we can weaken
1287
- // its debuginfo level to optimize build times.
1288
- if unit. kind . is_host ( ) && profile. debuginfo . is_deferred ( ) {
1287
+ // its debuginfo level to optimize build times. We do nothing if it's an artifact dependency,
1288
+ // as it and its debuginfo may end up embedded in the main program.
1289
+ if unit. kind . is_host ( ) && profile. debuginfo . is_deferred ( ) && !unit. artifact . is_true ( ) {
1289
1290
// We create a "probe" test to see if a unit with the same explicit debuginfo level exists
1290
1291
// in the graph. This is the level we'd expect if it was set manually or the default value
1291
1292
// set by a profile for a runtime dependency: its canonical value.
You can’t perform that action at this time.
0 commit comments