patch-src_librustc_session_filesearch_rs 674 B

1234567891011121314151617
  1. $OpenBSD: patch-src_librustc_session_filesearch_rs,v 1.4 2017/02/15 12:52:35 landry Exp $
  2. fallback to LOCALBASE as default sysroot.
  3. --- src/librustc/session/filesearch.rs.orig Mon Jul 4 20:04:09 2016
  4. +++ src/librustc/session/filesearch.rs Tue Jul 5 19:01:38 2016
  5. @@ -161,7 +161,10 @@ pub fn get_or_default_sysroot() -> PathBuf {
  6. match canonicalize(env::current_exe().ok()) {
  7. Some(mut p) => { p.pop(); p.pop(); p }
  8. - None => bug!("can't determine value for sysroot")
  9. + None => match option_env!("LOCALBASE") {
  10. + Some(dir) => PathBuf::from(dir),
  11. + None => bug!("can't determine value for sysroot"),
  12. + }
  13. }
  14. }