Skip to content

Rollup of 7 pull requests #131372

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

Merged
merged 23 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c592eac
skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on
onur-ozkan Sep 17, 2024
6414d9f
Couple of changes to make it easier to compile rustc for wasm
bjorn3 Sep 26, 2024
89e84c0
Use `Rc` less in `MirBorrowckCtxt`.
nnethercote Oct 4, 2024
3d7fe9e
Use `Box` instead of `Rc` for `polonius_output`.
nnethercote Oct 4, 2024
d9975ce
Avoid `Rc` in `BodyWithBorrowckFacts`.
nnethercote Oct 4, 2024
56e849c
Avoid `&Rc<T>` arguments.
nnethercote Oct 4, 2024
c69d174
Remove unnecessary lifetime in `ConditionVisitor`.
nnethercote Oct 4, 2024
68034f8
Disable -Zdual-proc-macros if the target doesn't support proc-macros
bjorn3 Oct 4, 2024
bf1f5c9
Avoid unused import warning for the Ctrl-C handler on wasm
bjorn3 Oct 4, 2024
aa4f16a
Check that `#[pointee]` is applied only to generic arguments
Brezak Aug 20, 2024
a961be9
Remove valgrind test suite and support from compiletest
jieyouxu Oct 7, 2024
de588a6
Remove valgrind test suite support from bootstrap
jieyouxu Oct 7, 2024
f1e408a
Remove valgrind test suite from opt-dist
jieyouxu Oct 7, 2024
fa3c25e
Delete the `run-pass-valgrind` test suite
jieyouxu Oct 7, 2024
4085b48
Fix used_underscore_binding in rustc_serialize
practicalrs Oct 7, 2024
65cff8a
Mark Boxy as on vacation
compiler-errors Oct 7, 2024
bd2e7ee
Rollup merge of #128721 - Brezak:pointee-in-strange-places, r=pnkfelix
workingjubilee Oct 7, 2024
8cd9d95
Rollup merge of #130479 - onur-ozkan:llvm-bitcode-linker-multiple-can…
workingjubilee Oct 7, 2024
31fbf67
Rollup merge of #130899 - bjorn3:wasi_bootstrap_fixes, r=davidtwco
workingjubilee Oct 7, 2024
9c4732a
Rollup merge of #131225 - nnethercote:rustc_borrowck-mm, r=lqd
workingjubilee Oct 7, 2024
f88bfa3
Rollup merge of #131351 - jieyouxu:yeet-the-valgrind, r=Kobzol
workingjubilee Oct 7, 2024
3f88d6a
Rollup merge of #131359 - practicalrs:fix_used_underscore_binding, r=…
workingjubilee Oct 7, 2024
ee6663e
Rollup merge of #131367 - compiler-errors:unboxy, r=lqd
workingjubilee Oct 7, 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
7 changes: 3 additions & 4 deletions compiler/rustc_driver_impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ use std::path::PathBuf;
use std::process::{self, Command, Stdio};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, OnceLock};
use std::time::{Duration, Instant, SystemTime};
use std::time::{Instant, SystemTime};
use std::{env, str};

use rustc_ast as ast;
use rustc_codegen_ssa::traits::CodegenBackend;
use rustc_codegen_ssa::{CodegenErrors, CodegenResults};
use rustc_const_eval::CTRL_C_RECEIVED;
use rustc_data_structures::profiling::{
TimePassesFormat, get_resident_set_size, print_time_passes_entry,
};
Expand Down Expand Up @@ -1577,8 +1576,8 @@ pub fn install_ctrlc_handler() {
// time to check CTRL_C_RECEIVED and run its own shutdown logic, but after a short amount
// of time exit the process. This sleep+exit ensures that even if nobody is checking
// CTRL_C_RECEIVED, the compiler exits reasonably promptly.
CTRL_C_RECEIVED.store(true, Ordering::Relaxed);
std::thread::sleep(Duration::from_millis(100));
rustc_const_eval::CTRL_C_RECEIVED.store(true, Ordering::Relaxed);
std::thread::sleep(std::time::Duration::from_millis(100));
std::process::exit(1);
})
.expect("Unable to install ctrlc handler");
Expand Down
6 changes: 5 additions & 1 deletion compiler/rustc_fs_util/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,14 @@ pub fn link_or_copy<P: AsRef<Path>, Q: AsRef<Path>>(p: P, q: Q) -> io::Result<Li
}
}

#[cfg(unix)]
#[cfg(any(unix, all(target_os = "wasi", target_env = "p1")))]
pub fn path_to_c_string(p: &Path) -> CString {
use std::ffi::OsStr;
#[cfg(unix)]
use std::os::unix::ffi::OsStrExt;
#[cfg(all(target_os = "wasi", target_env = "p1"))]
use std::os::wasi::ffi::OsStrExt;

let p: &OsStr = p.as_ref();
CString::new(p.as_bytes()).unwrap()
}
Expand Down
20 changes: 17 additions & 3 deletions src/bootstrap/src/core/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1687,10 +1687,24 @@ impl<'a> Builder<'a> {
match mode {
Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {}
Mode::Rustc | Mode::Codegen | Mode::ToolRustc => {
// Build proc macros both for the host and the target
// Build proc macros both for the host and the target unless proc-macros are not
// supported by the target.
if target != compiler.host && cmd_kind != Kind::Check {
cargo.arg("-Zdual-proc-macros");
rustflags.arg("-Zdual-proc-macros");
let error = command(self.rustc(compiler))
.arg("--target")
.arg(target.rustc_target_arg())
.arg("--print=file-names")
.arg("--crate-type=proc-macro")
.arg("-")
.run_capture(self)
.stderr();
let not_supported = error
.lines()
.any(|line| line.contains("unsupported crate type `proc-macro`"));
if !not_supported {
cargo.arg("-Zdual-proc-macros");
rustflags.arg("-Zdual-proc-macros");
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/bootstrap/src/utils/shared_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pub fn exe(name: &str, target: &str) -> String {
format!("{name}.exe")
} else if target.contains("uefi") {
format!("{name}.efi")
} else if target.contains("wasm") {
format!("{name}.wasm")
} else {
name.to_string()
}
Expand Down