Skip to content

Commit adb3300

Browse files
committed
rpath computation: explain why we pop()
1 parent 3e58dab commit adb3300

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc_codegen_llvm/back/rpath.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String
101101

102102
let cwd = env::current_dir().unwrap();
103103
let mut lib = fs::canonicalize(&cwd.join(lib)).unwrap_or_else(|_| cwd.join(lib));
104-
lib.pop();
104+
lib.pop(); // strip filename
105105
let mut output = cwd.join(&config.out_filename);
106-
output.pop();
106+
output.pop(); // strip filename
107107
let output = fs::canonicalize(&output).unwrap_or(output);
108108
let relative = path_relative_from(&lib, &output).unwrap_or_else(||
109109
panic!("couldn't create relative path from {:?} to {:?}", output, lib));

0 commit comments

Comments
 (0)