diff options
| author | Andy Russell <arussell123@gmail.com> | 2019-02-22 10:24:29 -0500 |
|---|---|---|
| committer | Andy Russell <arussell123@gmail.com> | 2019-03-01 21:27:43 -0500 |
| commit | 12d8a7d64e0c70a33dea591f7158aad38b1563c5 (patch) | |
| tree | d52b4128e38429a730148e7467d6cb7de2c09c40 /src | |
| parent | 5360ded0e50b332b8f7dfc725e3a59d34d4265a8 (diff) | |
| download | rust-12d8a7d64e0c70a33dea591f7158aad38b1563c5.tar.gz rust-12d8a7d64e0c70a33dea591f7158aad38b1563c5.zip | |
look for python2 symlinks before bootstrap python
Before this commit, if you're running x.py directly on a system where `python` is symlinked to Python 3, then the `python` config option will default to a Python 3 interpreter. This causes debuginfo tests to fail with an opaque error message, since they have a hard requirement on Python 2. This commit modifies the Python probe behavior to look for python2.7 and python2 *before* using the interpreter used to execute `x.py`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bootstrap/sanity.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs index 1a26309b471..b9f456e9100 100644 --- a/src/bootstrap/sanity.rs +++ b/src/bootstrap/sanity.rs @@ -109,9 +109,9 @@ pub fn check(build: &mut Build) { } build.config.python = build.config.python.take().map(|p| cmd_finder.must_have(p)) - .or_else(|| env::var_os("BOOTSTRAP_PYTHON").map(PathBuf::from)) // set by bootstrap.py .or_else(|| cmd_finder.maybe_have("python2.7")) .or_else(|| cmd_finder.maybe_have("python2")) + .or_else(|| env::var_os("BOOTSTRAP_PYTHON").map(PathBuf::from)) // set by bootstrap.py .or_else(|| Some(cmd_finder.must_have("python"))); build.config.nodejs = build.config.nodejs.take().map(|p| cmd_finder.must_have(p)) |
