From: kennytm Date: Fri, 7 Sep 2018 05:47:22 +0000 (+0800) Subject: Rollup merge of #53967 - froydnj:cmake-python-executable, r=alexcrichton X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=1681b154ee3e88e57c571895ad1eb7d8e1ebe0d8;p=rust.git Rollup merge of #53967 - froydnj:cmake-python-executable, r=alexcrichton propagate build.python into cmake If a suitable value of Python is not on `PATH`, one can still invoke x.py manually, which propagates `BOOTSTRAP_PYTHON` into the bootstrap environment. But building LLVM will abort with error messages about not being able to find Python, and instructions to set `PYTHON_EXECUTABLE`, because nothing is done with `BOOTSTRAP_PYTHON` when invoking cmake. Setting `build.python` in config.toml had no effect in this scenario, either To fix this, let's provide `PYTHON_EXECUTABLE` when invoking cmake; for the "normal" case of Python in `PATH`, this doesn't alter any behavior. For more unusual cases, however, this ensures cmake finds Python properly. (This change also ensures there are no differences between what bootstrap is using, and what cmake uses, which may be useful for consistency's sake.) --- 1681b154ee3e88e57c571895ad1eb7d8e1ebe0d8