@@ -455,7 +455,7 @@ fn diagnostics_works() {
455
455
#[ cfg( target_os = "macos" ) ]
456
456
#[ cargo_test( requires_nm, nightly, reason = "-Zremap-path-scope is unstable" ) ]
457
457
fn object_works ( ) {
458
- object_works_helper ( |path| {
458
+ object_works_helper ( "off" , |path| {
459
459
std:: process:: Command :: new ( "nm" )
460
460
. arg ( "-pa" )
461
461
. arg ( path)
@@ -468,7 +468,7 @@ fn object_works() {
468
468
#[ cfg( target_os = "linux" ) ]
469
469
#[ cargo_test( requires_readelf, nightly, reason = "-Zremap-path-scope is unstable" ) ]
470
470
fn object_works ( ) {
471
- object_works_helper ( |path| {
471
+ object_works_helper ( "off" , |path| {
472
472
std:: process:: Command :: new ( "readelf" )
473
473
. arg ( "-wi" )
474
474
. arg ( path)
@@ -479,7 +479,7 @@ fn object_works() {
479
479
}
480
480
481
481
#[ cfg( unix) ]
482
- fn object_works_helper ( run : impl Fn ( & std:: path:: Path ) -> Vec < u8 > ) {
482
+ fn object_works_helper ( split_debuginfo : & str , run : impl Fn ( & std:: path:: Path ) -> Vec < u8 > ) {
483
483
use std:: os:: unix:: ffi:: OsStrExt ;
484
484
485
485
let registry_src = paths:: home ( ) . join ( ".cargo/registry/src" ) ;
@@ -495,14 +495,17 @@ fn object_works_helper(run: impl Fn(&std::path::Path) -> Vec<u8>) {
495
495
let p = project ( )
496
496
. file (
497
497
"Cargo.toml" ,
498
- r#"
498
+ & format ! ( r#"
499
499
[package]
500
500
name = "foo"
501
501
version = "0.0.1"
502
502
503
503
[dependencies]
504
504
bar = "0.0.1"
505
- "# ,
505
+
506
+ [profile.dev]
507
+ split-debuginfo = "{split_debuginfo}"
508
+ "# ) ,
506
509
)
507
510
. file ( "src/main.rs" , "fn main() { bar::f(); }" )
508
511
. build ( ) ;
0 commit comments