diff options
| author | bors <bors@rust-lang.org> | 2022-09-17 22:04:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-17 22:04:28 +0000 |
| commit | 5253b0a0a1f366fad0ebed57597fcf2703b9e893 (patch) | |
| tree | 8111bda03a6a21e62ba5c5ae16ac54619f21cbd1 /src/bootstrap | |
| parent | 98ad6a5519651af36e246c0335c964dd52c554ba (diff) | |
| parent | 5ba52ca002bd1ee2d7f9fe1969c21e8faaf9edac (diff) | |
| download | rust-5253b0a0a1f366fad0ebed57597fcf2703b9e893.tar.gz rust-5253b0a0a1f366fad0ebed57597fcf2703b9e893.zip | |
Auto merge of #101949 - matthiaskrgr:rollup-xu5cqnd, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #101093 (Initial version of 1.64 release notes)
- #101713 (change AccessLevels representation)
- #101821 (Bump Unicode to version 15.0.0, regenerate tables)
- #101826 (Enforce "joined()" and "joined_with_noop()" test)
- #101835 (Allow using vendoring when running bootstrap from outside the source root)
- #101942 (Revert "Copy stage0 binaries into stage0-sysroot")
- #101943 (rustdoc: remove unused CSS `.non-exhaustive { margin-bottom }`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 3 | ||||
| -rw-r--r-- | src/bootstrap/builder.rs | 3 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 37 |
3 files changed, 5 insertions, 38 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 350d87d58a4..57128685d91 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -778,7 +778,8 @@ class RustBuild(object): elif color == "never": args.append("--color=never") - run(args, env=env, verbose=self.verbose) + # Run this from the source directory so cargo finds .cargo/config + run(args, env=env, verbose=self.verbose, cwd=self.rust_root) def build_triple(self): """Build triple as in LLVM diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index b654db6dbe9..36f990b72ff 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1325,6 +1325,9 @@ impl<'a> Builder<'a> { ) -> Cargo { let mut cargo = Command::new(&self.initial_cargo); let out_dir = self.stage_out(compiler, mode); + // Run cargo from the source root so it can find .cargo/config. + // This matters when using vendoring and the working directory is outside the repository. + cargo.current_dir(&self.src); // Codegen backends are not yet tracked by -Zbinary-dep-depinfo, // so we need to explicitly clear out if they've been updated. diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index f7ab6bf93fb..c13e83f6c86 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -436,43 +436,6 @@ impl Step for StdLink { let libdir = builder.sysroot_libdir(target_compiler, target); let hostdir = builder.sysroot_libdir(target_compiler, compiler.host); add_to_sysroot(builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target)); - - if compiler.stage == 0 { - // special handling for stage0, to make `rustup toolchain link` and `x dist --stage 0` - // work for stage0-sysroot - - // copy bin files from stage0/bin to stage0-sysroot/bin - let sysroot = builder.out.join(&compiler.host.triple).join("stage0-sysroot"); - - let host = compiler.host.triple; - let stage0_bin_dir = builder.out.join(&host).join("stage0/bin"); - let sysroot_bin_dir = sysroot.join("bin"); - t!(fs::create_dir_all(&sysroot_bin_dir)); - builder.cp_r(&stage0_bin_dir, &sysroot_bin_dir); - - // copy all *.so files from stage0/lib to stage0-sysroot/lib - let stage0_lib_dir = builder.out.join(&host).join("stage0/lib"); - if let Ok(files) = fs::read_dir(&stage0_lib_dir) { - for file in files { - let file = t!(file); - let path = file.path(); - if path.is_file() && is_dylib(&file.file_name().into_string().unwrap()) { - builder.copy(&path, &sysroot.join("lib").join(path.file_name().unwrap())); - } - } - } - - // copy codegen-backends from stage0 - let sysroot_codegen_backends = builder.sysroot_codegen_backends(compiler); - t!(fs::create_dir_all(&sysroot_codegen_backends)); - let stage0_codegen_backends = builder - .out - .join(&host) - .join("stage0/lib/rustlib") - .join(&host) - .join("codegen-backends"); - builder.cp_r(&stage0_codegen_backends, &sysroot_codegen_backends); - } } } |
