about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2019-02-10 13:05:37 +0100
committerRalf Jung <post@ralfj.de>2019-02-10 13:05:43 +0100
commitadb33008f703320727d5022640e9a09cdc4fa8a6 (patch)
tree9be2194d5599eb4f0d733f602e21750317bfe38a /src/librustc_codegen_llvm
parent3e58dabc16b1678da8702c71f70c72644764226c (diff)
downloadrust-adb33008f703320727d5022640e9a09cdc4fa8a6.tar.gz
rust-adb33008f703320727d5022640e9a09cdc4fa8a6.zip
rpath computation: explain why we pop()
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/back/rpath.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/back/rpath.rs b/src/librustc_codegen_llvm/back/rpath.rs
index aeff23dec41..a5c828e089f 100644
--- a/src/librustc_codegen_llvm/back/rpath.rs
+++ b/src/librustc_codegen_llvm/back/rpath.rs
@@ -101,9 +101,9 @@ fn get_rpath_relative_to_output(config: &mut RPathConfig, lib: &Path) -> String
 
     let cwd = env::current_dir().unwrap();
     let mut lib = fs::canonicalize(&cwd.join(lib)).unwrap_or_else(|_| cwd.join(lib));
-    lib.pop();
+    lib.pop(); // strip filename
     let mut output = cwd.join(&config.out_filename);
-    output.pop();
+    output.pop(); // strip filename
     let output = fs::canonicalize(&output).unwrap_or(output);
     let relative = path_relative_from(&lib, &output).unwrap_or_else(||
         panic!("couldn't create relative path from {:?} to {:?}", output, lib));