Skip to content

Commit 5f2073f

Browse files
committed
rustc_codegen_cranelift: use try_canonicalize
This is simpler and avoids unnecessary calls to `env::current_dir`.
1 parent a081007 commit 5f2073f

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_codegen_cranelift/build_system

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_cranelift/build_system/main.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ fn main() {
134134
}
135135
}
136136

137-
let current_dir = std::env::current_dir().unwrap();
138-
out_dir = current_dir.join(out_dir);
137+
out_dir = rustc_fs_util::try_canonicalize(out_dir).unwrap();
139138

140139
if command == Command::Prepare {
141140
prepare::prepare(&path::Dirs {

0 commit comments

Comments
 (0)