]> git.lizzy.rs Git - rust.git/commit
Fix rustc sysroot in systems using CAS
authorRamon de C Valle <rcvalle@users.noreply.github.com>
Sat, 21 Nov 2020 04:11:54 +0000 (20:11 -0800)
committerRamon de C Valle <rcvalle@users.noreply.github.com>
Thu, 28 Jan 2021 03:27:23 +0000 (19:27 -0800)
commit3f679fef23cd006c336e2a4f7c6707e119d22206
tree43f60f9b9b2a884e6aab8a53188f170a1d8b79ff
parent432d116a5c2565774bae4c42fcacab8b685608b5
Fix rustc sysroot in systems using CAS

Change filesearch::get_or_default_sysroot() to check if sysroot is found
using env::args().next() if rustc in argv[0] is a symlink; otherwise, or
if it is not found, use env::current_exe() to imply sysroot. This makes
the rustc binary able to locate Rust libraries in systems using
content-addressable storage (CAS).
compiler/rustc_session/src/filesearch.rs