diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000000000..57bfd95a90386 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +use x.py instead: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 54d0a23dec58d..56a6660fe9327 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -193,7 +193,10 @@ def default_build_triple(verbose): # install, use their preference. This fixes most issues with Windows builds # being detected as GNU instead of MSVC. try: - version = subprocess.check_output(["rustc", "--version", "--verbose"]) + # https://stackoverflow.com/questions/48333999 + fs_root = os.path.abspath('.').split(os.path.sep)[0]+os.path.sep + version = subprocess.check_output(["rustc", "--version", "--verbose"], + cwd=fs_root) host = next(x for x in version.split('\n') if x.startswith("host: ")) triple = host.split("host: ")[1] if verbose: