Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #129993

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
7627a54
Call the target libdir target libdir
Noratrieb Jun 7, 2024
27f92b6
fix: get llvm type of global val
LYF1999 Aug 8, 2024
c6111c0
Remove the `'body` lifetime on `FilterInformation`.
nnethercote Aug 29, 2024
0a282ea
Move `WriteInfo` out of `Allocations`.
nnethercote Aug 29, 2024
ad5a6e1
Remove `Allocations`.
nnethercote Aug 29, 2024
1be2204
Simplify `Candidate`.
nnethercote Aug 29, 2024
0d156f2
Unify scraped examples with other code examples
GuillaumeGomez Aug 30, 2024
5b75f8a
Update rustdoc GUI tests
GuillaumeGomez Aug 30, 2024
5afc461
Fix wrong rounded corners when line numbers are displayed on code exa…
GuillaumeGomez Aug 31, 2024
84259ff
Add GUI tests to ensure that rounded corners on code blocks are worki…
GuillaumeGomez Aug 31, 2024
35a7c1b
Fix position of scraped examples title on mobile devices
GuillaumeGomez Sep 1, 2024
dd5f7bc
Add GUI regression test for scraped examples title position on mobile
GuillaumeGomez Sep 1, 2024
4825fb1
Add missing CSS variables in GUI test for `custom-theme.css`
GuillaumeGomez Sep 1, 2024
5a85632
Correctly handle code examples buttons position
GuillaumeGomez Sep 1, 2024
01d8235
Fix scraped examples background gradient
GuillaumeGomez Sep 1, 2024
e3af6dc
Simplify CSS but wrapping scraped example into a div and move the tit…
GuillaumeGomez Sep 2, 2024
55bc638
Fix wrong padding for expanded scraped example
GuillaumeGomez Sep 2, 2024
65e78db
Elaborate on deriving vs implementing `Copy`
chancancode Sep 3, 2024
3626b66
Update marker.rs
chancancode Sep 3, 2024
efc20de
Update marker.rs
chancancode Sep 3, 2024
277a08c
Update marker.rs
chancancode Sep 3, 2024
e45b53e
Update marker.rs
chancancode Sep 3, 2024
7157f98
Fix square corners on line numbers when code is collapsed
GuillaumeGomez Sep 3, 2024
a4f2a31
Don't ICE when dumping MIR of a synthetic coroutine body
compiler-errors Aug 28, 2024
5525043
Rename dump of coroutine by-move-body to be more consistent, adjust test
compiler-errors Aug 28, 2024
8860008
Re-parent the by-move body
compiler-errors Aug 28, 2024
2031eac
run_make_support: rename `Command::stdin` to `stdin_buf` and add `std…
jieyouxu Sep 4, 2024
afed862
tests: use renamed `stdin_buf`
jieyouxu Sep 5, 2024
8871ce0
run_make_support: make each command invocation only-run-once
jieyouxu Sep 5, 2024
a459403
Sort impl associated items by kinds and then by appearance
GuillaumeGomez Aug 23, 2024
f96aff9
Add regression test for impl associated items sorting
GuillaumeGomez Aug 23, 2024
1884983
Make impl associated constants sorted first
GuillaumeGomez Aug 25, 2024
d059f37
Add missing sidebar associated items
GuillaumeGomez Aug 26, 2024
238944c
Add regression test for sidebar associated items
GuillaumeGomez Aug 26, 2024
8f9c4b3
Update to new rustdoc internal API
GuillaumeGomez Sep 5, 2024
f8f4d50
Don't worry about uncaptured contravariant lifetimes if they outlive …
compiler-errors Aug 12, 2024
7064135
Do less work on the good path
compiler-errors Aug 12, 2024
c1d0410
Review comments
compiler-errors Aug 19, 2024
b514f52
Rollup merge of #126136 - Noratrieb:bootstrap-naming, r=onur-ozkan
matthiaskrgr Sep 5, 2024
9039bcf
Rollup merge of #128820 - LYF1999:yf/dev, r=nikic
matthiaskrgr Sep 5, 2024
8f396e0
Rollup merge of #129028 - compiler-errors:contra, r=lcnr
matthiaskrgr Sep 5, 2024
36f4539
Rollup merge of #129471 - GuillaumeGomez:sort-impl-associated-items, …
matthiaskrgr Sep 5, 2024
41ce7a9
Rollup merge of #129706 - compiler-errors:scratch, r=estebank
matthiaskrgr Sep 5, 2024
e590201
Rollup merge of #129720 - nnethercote:simplify-dest_prop-mm, r=cjgillot
matthiaskrgr Sep 5, 2024
3f99c12
Rollup merge of #129796 - GuillaumeGomez:unify-code-examples, r=notri…
matthiaskrgr Sep 5, 2024
86bd866
Rollup merge of #129938 - chancancode:patch-1, r=thomcc
matthiaskrgr Sep 5, 2024
0be10be
Rollup merge of #129973 - jieyouxu:rework-rmake-stdio, r=Kobzol
matthiaskrgr Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/bootstrap/src/core/build_steps/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ impl Step for Std {
// We skip populating the sysroot in non-zero stage because that'll lead
// to rlib/rmeta conflicts if std gets built during this session.
if compiler.stage == 0 {
let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
let libdir = builder.sysroot_target_libdir(compiler, target);
let hostdir = builder.sysroot_target_libdir(compiler, compiler.host);
add_to_sysroot(builder, &libdir, &hostdir, &libstd_stamp(builder, compiler, target));
}
drop(_guard);
Expand Down Expand Up @@ -257,8 +257,8 @@ impl Step for Rustc {
false,
);

let libdir = builder.sysroot_libdir(compiler, target);
let hostdir = builder.sysroot_libdir(compiler, compiler.host);
let libdir = builder.sysroot_target_libdir(compiler, target);
let hostdir = builder.sysroot_target_libdir(compiler, compiler.host);
add_to_sysroot(builder, &libdir, &hostdir, &librustc_stamp(builder, compiler, target));
}
}
Expand Down
36 changes: 22 additions & 14 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ impl Step for Std {
.join("bin");
if src_sysroot_bin.exists() {
let target_sysroot_bin =
builder.sysroot_libdir(compiler, target).parent().unwrap().join("bin");
builder.sysroot_target_libdir(compiler, target).parent().unwrap().join("bin");
t!(fs::create_dir_all(&target_sysroot_bin));
builder.cp_link_r(&src_sysroot_bin, &target_sysroot_bin);
}
Expand Down Expand Up @@ -354,7 +354,7 @@ fn copy_third_party_objects(
&& (target.contains("linux") || target.contains("fuchsia"))
{
let libunwind_path =
copy_llvm_libunwind(builder, target, &builder.sysroot_libdir(*compiler, target));
copy_llvm_libunwind(builder, target, &builder.sysroot_target_libdir(*compiler, target));
target_deps.push((libunwind_path, DependencyType::Target));
}

Expand All @@ -367,7 +367,8 @@ fn copy_self_contained_objects(
compiler: &Compiler,
target: TargetSelection,
) -> Vec<(PathBuf, DependencyType)> {
let libdir_self_contained = builder.sysroot_libdir(*compiler, target).join("self-contained");
let libdir_self_contained =
builder.sysroot_target_libdir(*compiler, target).join("self-contained");
t!(fs::create_dir_all(&libdir_self_contained));
let mut target_deps = vec![];

Expand Down Expand Up @@ -675,8 +676,8 @@ impl Step for StdLink {
let hostdir = sysroot.join(lib).join("rustlib").join(compiler.host).join("lib");
(libdir, hostdir)
} else {
let libdir = builder.sysroot_libdir(target_compiler, target);
let hostdir = builder.sysroot_libdir(target_compiler, compiler.host);
let libdir = builder.sysroot_target_libdir(target_compiler, target);
let hostdir = builder.sysroot_target_libdir(target_compiler, compiler.host);
(libdir, hostdir)
};

Expand Down Expand Up @@ -743,7 +744,7 @@ fn copy_sanitizers(
}

let mut target_deps = Vec::new();
let libdir = builder.sysroot_libdir(*compiler, target);
let libdir = builder.sysroot_target_libdir(*compiler, target);

for runtime in &runtimes {
let dst = libdir.join(&runtime.name);
Expand Down Expand Up @@ -821,7 +822,7 @@ impl Step for StartupObjects {

let src_dir = &builder.src.join("library").join("rtstartup");
let dst_dir = &builder.native_dir(target).join("rtstartup");
let sysroot_dir = &builder.sysroot_libdir(for_compiler, target);
let sysroot_dir = &builder.sysroot_target_libdir(for_compiler, target);
t!(fs::create_dir_all(dst_dir));

for file in &["rsbegin", "rsend"] {
Expand Down Expand Up @@ -1273,10 +1274,17 @@ fn rustc_llvm_env(builder: &Builder<'_>, cargo: &mut Cargo, target: TargetSelect
}
}

/// `RustcLink` copies all of the rlibs from the rustc build into the previous stage's sysroot.
/// This is necessary for tools using `rustc_private`, where the previous compiler will build
/// a tool against the next compiler.
/// To build a tool against a compiler, the rlibs of that compiler that it links against
/// must be in the sysroot of the compiler that's doing the compiling.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
struct RustcLink {
/// The compiler whose rlibs we are copying around.
pub compiler: Compiler,
pub target_compiler: Compiler,
/// This is the compiler into whose sysroot we want to copy the rlibs into.
pub previous_stage_compiler: Compiler,
pub target: TargetSelection,
/// Not actually used; only present to make sure the cache invalidation is correct.
crates: Vec<String>,
Expand All @@ -1286,7 +1294,7 @@ impl RustcLink {
fn from_rustc(rustc: Rustc, host_compiler: Compiler) -> Self {
Self {
compiler: host_compiler,
target_compiler: rustc.compiler,
previous_stage_compiler: rustc.compiler,
target: rustc.target,
crates: rustc.crates,
}
Expand All @@ -1303,12 +1311,12 @@ impl Step for RustcLink {
/// Same as `std_link`, only for librustc
fn run(self, builder: &Builder<'_>) {
let compiler = self.compiler;
let target_compiler = self.target_compiler;
let previous_stage_compiler = self.previous_stage_compiler;
let target = self.target;
add_to_sysroot(
builder,
&builder.sysroot_libdir(target_compiler, target),
&builder.sysroot_libdir(target_compiler, compiler.host),
&builder.sysroot_target_libdir(previous_stage_compiler, target),
&builder.sysroot_target_libdir(previous_stage_compiler, compiler.host),
&librustc_stamp(builder, compiler, target),
);
}
Expand Down Expand Up @@ -1845,7 +1853,7 @@ impl Step for Assemble {
let sysroot = builder.sysroot(target_compiler);
let rustc_libdir = builder.rustc_libdir(target_compiler);
t!(fs::create_dir_all(&rustc_libdir));
let src_libdir = builder.sysroot_libdir(build_compiler, host);
let src_libdir = builder.sysroot_target_libdir(build_compiler, host);
for f in builder.read_dir(&src_libdir) {
let filename = f.file_name().into_string().unwrap();
if (is_dylib(&filename) || is_debug_info(&filename)) && !proc_macros.contains(&filename)
Expand All @@ -1858,7 +1866,7 @@ impl Step for Assemble {

// We prepend this bin directory to the user PATH when linking Rust binaries. To
// avoid shadowing the system LLD we rename the LLD we provide to `rust-lld`.
let libdir = builder.sysroot_libdir(target_compiler, target_compiler.host);
let libdir = builder.sysroot_target_libdir(target_compiler, target_compiler.host);
let libdir_bin = libdir.parent().unwrap().join("bin");
t!(fs::create_dir_all(&libdir_bin));
if let Some(lld_install) = lld_install {
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ impl Step for Rustc {

// Copy over lld if it's there
if builder.config.lld_enabled {
let src_dir = builder.sysroot_libdir(compiler, host).parent().unwrap().join("bin");
let src_dir =
builder.sysroot_target_libdir(compiler, host).parent().unwrap().join("bin");
let rust_lld = exe("rust-lld", compiler.host);
builder.copy_link(&src_dir.join(&rust_lld), &dst_dir.join(&rust_lld));
let self_contained_lld_src_dir = src_dir.join("gcc-ld");
Expand Down
10 changes: 5 additions & 5 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ impl Step for RustdocTheme {
.arg(builder.src.join("src/librustdoc/html/static/css/rustdoc.css").to_str().unwrap())
.env("RUSTC_STAGE", self.compiler.stage.to_string())
.env("RUSTC_SYSROOT", builder.sysroot(self.compiler))
.env("RUSTDOC_LIBDIR", builder.sysroot_libdir(self.compiler, self.compiler.host))
.env("RUSTDOC_LIBDIR", builder.sysroot_target_libdir(self.compiler, self.compiler.host))
.env("CFG_RELEASE_CHANNEL", &builder.config.channel)
.env("RUSTDOC_REAL", builder.rustdoc(self.compiler))
.env("RUSTC_BOOTSTRAP", "1");
Expand Down Expand Up @@ -1728,7 +1728,7 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
// of them!

cmd.arg("--compile-lib-path").arg(builder.rustc_libdir(compiler));
cmd.arg("--run-lib-path").arg(builder.sysroot_libdir(compiler, target));
cmd.arg("--run-lib-path").arg(builder.sysroot_target_libdir(compiler, target));
cmd.arg("--rustc-path").arg(builder.rustc(compiler));

let is_rustdoc = suite.ends_with("rustdoc-ui") || suite.ends_with("rustdoc-js");
Expand Down Expand Up @@ -2556,7 +2556,7 @@ fn prepare_cargo_test(
// by `Cargo::new` and that actually makes things go wrong.
if builder.kind != Kind::Miri {
let mut dylib_path = dylib_path();
dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
dylib_path.insert(0, PathBuf::from(&*builder.sysroot_target_libdir(compiler, target)));
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
}

Expand Down Expand Up @@ -2791,7 +2791,7 @@ impl Step for CrateRustdoc {
let libdir = if builder.download_rustc() {
builder.rustc_libdir(compiler)
} else {
builder.sysroot_libdir(compiler, target).to_path_buf()
builder.sysroot_target_libdir(compiler, target).to_path_buf()
};
let mut dylib_path = dylib_path();
dylib_path.insert(0, PathBuf::from(&*libdir));
Expand Down Expand Up @@ -2916,7 +2916,7 @@ impl Step for RemoteCopyLibs {
cmd.run(builder);

// Push all our dylibs to the emulator
for f in t!(builder.sysroot_libdir(compiler, target).read_dir()) {
for f in t!(builder.sysroot_target_libdir(compiler, target).read_dir()) {
let f = t!(f);
let name = f.file_name().into_string().unwrap();
if helpers::is_dylib(&name) {
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/build_steps/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ impl ErrorIndex {
let compiler = builder.compiler_for(builder.top_stage, host, host);
let mut cmd = command(builder.ensure(ErrorIndex { compiler }));
let mut dylib_paths = builder.rustc_lib_paths(compiler);
dylib_paths.push(PathBuf::from(&builder.sysroot_libdir(compiler, compiler.host)));
dylib_paths.push(PathBuf::from(&builder.sysroot_target_libdir(compiler, compiler.host)));
add_dylib_path(dylib_paths, &mut cmd);
cmd
}
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ impl<'a> Builder<'a> {

/// Returns the libdir where the standard library and other artifacts are
/// found for a compiler's sysroot.
pub fn sysroot_libdir(&self, compiler: Compiler, target: TargetSelection) -> PathBuf {
pub fn sysroot_target_libdir(&self, compiler: Compiler, target: TargetSelection) -> PathBuf {
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
struct Libdir {
compiler: Compiler,
Expand Down Expand Up @@ -1200,7 +1200,7 @@ impl<'a> Builder<'a> {
}

pub fn sysroot_codegen_backends(&self, compiler: Compiler) -> PathBuf {
self.sysroot_libdir(compiler, compiler.host).with_file_name("codegen-backends")
self.sysroot_target_libdir(compiler, compiler.host).with_file_name("codegen-backends")
}

/// Returns the compiler's libdir where it stores the dynamic libraries that
Expand Down