@@ -991,7 +991,7 @@ impl Step for Rustc {
991991 true , // Only ship rustc_driver.so and .rmeta files, not all intermediate .rlib files.
992992 ) ;
993993
994- let target_root_dir = stamp. as_ref ( ) . parent ( ) . unwrap ( ) ;
994+ let target_root_dir = stamp. path ( ) . parent ( ) . unwrap ( ) ;
995995 // When building `librustc_driver.so` (like `libLLVM.so`) on linux, it can contain
996996 // unexpected debuginfo from dependencies, for example from the C++ standard library used in
997997 // our LLVM wrapper. Unless we're explicitly requesting `librustc_driver` to be built with
@@ -1478,7 +1478,7 @@ impl Step for CodegenBackend {
14781478 }
14791479 let stamp = build_stamp:: codegen_backend_stamp ( builder, compiler, target, & backend) ;
14801480 let codegen_backend = codegen_backend. to_str ( ) . unwrap ( ) ;
1481- t ! ( fs :: write ( stamp, codegen_backend) ) ;
1481+ t ! ( stamp. add_stamp ( codegen_backend) . write ( ) ) ;
14821482 }
14831483}
14841484
@@ -1516,7 +1516,7 @@ fn copy_codegen_backends_to_sysroot(
15161516 }
15171517
15181518 let stamp = build_stamp:: codegen_backend_stamp ( builder, compiler, target, backend) ;
1519- let dylib = t ! ( fs:: read_to_string( & stamp) ) ;
1519+ let dylib = t ! ( fs:: read_to_string( stamp. path ( ) ) ) ;
15201520 let file = Path :: new ( & dylib) ;
15211521 let filename = file. file_name ( ) . unwrap ( ) . to_str ( ) . unwrap ( ) ;
15221522 // change `librustc_codegen_cranelift-xxxxxx.so` to
@@ -2018,7 +2018,7 @@ pub fn run_cargo(
20182018 rlib_only_metadata : bool ,
20192019) -> Vec < PathBuf > {
20202020 // `target_root_dir` looks like $dir/$target/release
2021- let target_root_dir = stamp. as_ref ( ) . parent ( ) . unwrap ( ) ;
2021+ let target_root_dir = stamp. path ( ) . parent ( ) . unwrap ( ) ;
20222022 // `target_deps_dir` looks like $dir/$target/release/deps
20232023 let target_deps_dir = target_root_dir. join ( "deps" ) ;
20242024 // `host_root_dir` looks like $dir/release
@@ -2171,7 +2171,7 @@ pub fn run_cargo(
21712171 new_contents. extend ( dep. to_str ( ) . unwrap ( ) . as_bytes ( ) ) ;
21722172 new_contents. extend ( b"\0 " ) ;
21732173 }
2174- t ! ( fs:: write( stamp, & new_contents) ) ;
2174+ t ! ( fs:: write( stamp. path ( ) , & new_contents) ) ;
21752175 deps. into_iter ( ) . map ( |( d, _) | d) . collect ( )
21762176}
21772177
0 commit comments