diff options
| author | Joshua Nelson <jnelson@cloudflare.com> | 2022-09-14 18:19:28 -0500 |
|---|---|---|
| committer | Joshua Nelson <jnelson@cloudflare.com> | 2022-09-14 18:27:04 -0500 |
| commit | 55c040e52964e4ad81b4b2af3c91068a80b92f11 (patch) | |
| tree | 9e5a712c17665309287d6d387203af6517e53724 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 63f6289db2d90be05acdf615f8039383c52c4ddc (diff) | |
| download | rust-55c040e52964e4ad81b4b2af3c91068a80b92f11.tar.gz rust-55c040e52964e4ad81b4b2af3c91068a80b92f11.zip | |
Make it possible to run bootstrap on a different machine than the one it was built
- Default to trying git rev-parse for the root directory CARGO_MANIFEST_DIR is a path on the build machine, not the running machine. Don't require this to succeed, to allow building from a tarball; in that case fall back to CARGO_MANIFEST_DIR. - Set `initial_rustc` to a path based on the path of the running executable, not CARGO_MANIFEST_DIR. We only reset `initial_rustc` if we're sure this isn't the working tree bootstrap was originally built in, since I'm paranoid that setting this in other cases will cause things to break; it's not clear to me when $RUSTC differs from `build/$TARGET/stage0/bin/rustc` (maybe never? but better to be sure). Instead, only set this when a) We are not using a custom rustc. If someone has specified a custom rustc we should respect their wishes. b) We are in a checkout of rust-lang/rust other than the one bootstrap was built in.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
