Skip to content
This repository was archived by the owner on Mar 1, 2019. It is now read-only.

Commit 5fa0882

Browse files
committed
Add FIXMEs about libdir and target assumptions
1 parent 72cd8ae commit 5fa0882

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/loader.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ impl AnalysisLoader for CargoAnalysisLoader {
8787
.join("deps")
8888
.join("save-analysis");
8989
// FIXME sys_root_path allows to break out of 'sandbox' - is that Ok?
90+
// FIXME libs_path and src_path both assume the default `libdir = "lib"`.
9091
let sys_root_path = sys_root_path();
9192
let target_triple = extract_target_triple(sys_root_path.as_path());
9293
let libs_path = sys_root_path
@@ -111,6 +112,8 @@ impl AnalysisLoader for CargoAnalysisLoader {
111112
fn extract_target_triple(sys_root_path: &Path) -> String {
112113
// First try to get the triple from the rustc version output,
113114
// otherwise fall back on the rustup-style toolchain path.
115+
// FIXME: Both methods assume that the target is the host triple,
116+
// which isn't the case for cross-compilation (rust-lang/rls#309).
114117
extract_rustc_host_triple()
115118
.unwrap_or_else(|| extract_rustup_target_triple(sys_root_path))
116119
}

0 commit comments

Comments
 (0)