Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
d33b74b
Add `desktop` method to `CommandExt`
Jul 6, 2026
41deb5b
Stabilize bool::toggle
CenTdemeern1 Jul 31, 2026
7ebcc66
Add rustc_const_stable to bool::toggle
CenTdemeern1 Jul 31, 2026
fb8e117
apply slice visualizer to `*const [T]`, `*mut [T]` and `Box<[T]>`
Walnut356 Aug 10, 2026
1b9fa62
group related things together
lqd Aug 12, 2026
edd4a44
unify functions in impls
lqd Aug 12, 2026
0d287e8
tiny `drop_flag_effects_for_function_entry` cleanups
lqd Aug 12, 2026
c266bb2
get number of devices intrinisc
Sa4dUs Jun 17, 2026
efbb356
Add device arg to offload intrinisc
Sa4dUs Aug 13, 2026
ed486fb
Add a regression test for a panicking proc macro used as an inner att…
jakubadamw Aug 16, 2026
652eb84
Add a regression test for a `macro_rules!` generated by another crate…
jakubadamw Aug 16, 2026
d9d3a21
Add a regression test for full LTO against `rustc_private`
jakubadamw Aug 16, 2026
f18340b
Add a regression test for eliding the middle of a span containing har…
jakubadamw Aug 16, 2026
fd01bab
Add regression test for non lifetime binders
lsunsi Aug 16, 2026
70ae4e5
rust-installer/install-template.sh: catch cp(1) error when installing…
thesamesam Aug 17, 2026
b192a6c
Partially support building and locating wasm proc-macros
bjorn3 Aug 12, 2026
ea4e56a
Add --print wasm-proc-macro-tuple
bjorn3 Aug 13, 2026
dd69e6b
std: don't panic on long-elapsed deadlines for `sleep_until`
joboet Aug 18, 2026
1675872
Add regression test for inconsistent import resolution from issue 147208
lybang-lab Aug 18, 2026
99ee29e
Remove some unused `SparseBitMatrix` ops
nnethercote Aug 18, 2026
d448db8
Add a regression test for wrapping arithmetic under MIR optimisations
jakubadamw Aug 16, 2026
ceeaac0
Add regression test for nested RPIT not-an-iterator ICE
zakrad Aug 18, 2026
2151612
Remove `BitRelations`
nnethercote Aug 18, 2026
21e9c83
rustdoc: enable scrolling only on table/code
notriddle Aug 19, 2026
8ac67c5
Cleanup: Move impl of `#[rustc_dump_object_lifetime_defaults]`
fmease Aug 19, 2026
eae69d8
Add file path to some archive build errors
bjorn3 Aug 19, 2026
f151cb9
diagnostics: fix `let x: vec![]` suggestion pointing into stdlib
Rohan-Singla Jul 7, 2026
d827d44
Uplift rustfmt macro formatting fix
Manishearth Aug 19, 2026
3777642
Update with macro and some tweaks
Sa4dUs Aug 14, 2026
f11d76f
Allow running EC2 jobs locally
JonathanBrouwer Aug 19, 2026
6c99f69
Fix obvious copy/paste bug in `State::fmt_diff_with`
nnethercote Aug 19, 2026
dffe277
Remove unnecessary arg from `FlowSensitiveAnalysis::new`
nnethercote Aug 19, 2026
c7ead52
Factor out duplicated code in `Qualifs`
nnethercote Aug 19, 2026
6229d6d
Remove defaults for `Qualif` assoc consts
nnethercote Aug 19, 2026
bb9cd32
Pre-adjust visibility of pub items in `lib.rs`
Zalathar Aug 18, 2026
651d501
Pre-adjust visibility of default-visibility items in `lib.rs`
Zalathar Aug 17, 2026
72e9e0e
Pre-adjust imports from the crate root
Zalathar Aug 17, 2026
f068a50
Temporarily rename `lib.rs` to `session.rs`
Zalathar Aug 18, 2026
91374a5
Move all non-module items out of the crate root
Zalathar Aug 18, 2026
ac623ff
Double-word align `_Unwind_Exception`
hsanzg Aug 19, 2026
ed151ed
std: update definitions on Fuchsia
joboet Feb 14, 2026
95d6b37
std: implement `sleep_until` for Fuchsia
joboet Feb 14, 2026
1c0a0d9
std: update `sleep_until` syscall table
joboet May 21, 2026
2d28ce9
std: add a comment about elapsed deadlines for `sleep_until`
joboet Aug 20, 2026
9549cb7
rustdoc: add test case for digit overflow
notriddle Aug 20, 2026
2475f7c
Bump wasm-component-ld to 0.5.30
alexcrichton Aug 20, 2026
595ce4c
Tighten allocator `Send` and `Sync` bounds on `Arc`
maxdexh Aug 20, 2026
81d5d74
Rollup merge of #152617 - joboet:fuchsia_sleep_until, r=nia-e
jhpratt Aug 21, 2026
813d288
Rollup merge of #158934 - Rohan-Singla:fix/158492, r=jackh726
jhpratt Aug 21, 2026
649278e
Rollup merge of #160995 - lqd:readabilly, r=jackh726
jhpratt Aug 21, 2026
7659434
Rollup merge of #161277 - Zalathar:session, r=Kobzol
jhpratt Aug 21, 2026
b7dba0e
Rollup merge of #161295 - joboet:sleep_until-long-elapsed, r=tgross35
jhpratt Aug 21, 2026
1bdbe3a
Rollup merge of #161368 - hsanzg:uw-ex-align, r=bjorn3,tgross35
jhpratt Aug 21, 2026
bfff871
Rollup merge of #161370 - Manishearth:rustfmt-macro-fix, r=ytmimi
jhpratt Aug 21, 2026
fe89698
Rollup merge of #161378 - nnethercote:FlowSensitiveAnalysis-cleanups,…
jhpratt Aug 21, 2026
fc0db65
Rollup merge of #161420 - alexcrichton:update-wasm-component-ld, r=Ma…
jhpratt Aug 21, 2026
1228360
Rollup merge of #161429 - maxdexh:allocator-arc-sync-send, r=nia-e
jhpratt Aug 21, 2026
c50742e
Rollup merge of #158032 - Sa4dUs:offload-device-selection, r=ZuseZ4
jhpratt Aug 21, 2026
117977d
Rollup merge of #158855 - Krakoer:feat/commandext-desktop, r=ChrisDenton
jhpratt Aug 21, 2026
8d3d60a
Rollup merge of #160299 - CenTdemeern1:stabilize_bool_toggle, r=Mark-…
jhpratt Aug 21, 2026
34c47da
Rollup merge of #160842 - Walnut356:slice_ptr, r=Mark-Simulacrum
jhpratt Aug 21, 2026
d6998e2
Rollup merge of #160981 - bjorn3:proc_macro_refactors7, r=Mark-Simula…
jhpratt Aug 21, 2026
143e4b4
Rollup merge of #161199 - lsunsi:issue155802, r=ShoyuVanilla
jhpratt Aug 21, 2026
44f1ad0
Rollup merge of #161212 - thesamesam:rust-installer-fix-error, r=Mark…
jhpratt Aug 21, 2026
5300385
Rollup merge of #161302 - KevinA-cpu:regression-test-147208, r=khyperia
jhpratt Aug 21, 2026
3432c9f
Rollup merge of #161329 - jakubadamw:e-needs-test, r=jackh726
jhpratt Aug 21, 2026
80bac8a
Rollup merge of #161330 - zakrad:regr-test-159559, r=JohnTitor
jhpratt Aug 21, 2026
e0949ac
Rollup merge of #161331 - nnethercote:bitset-simplifications, r=Mark-…
jhpratt Aug 21, 2026
b320300
Rollup merge of #161340 - notriddle:rustdoc-overflow, r=lolbinarycat,…
jhpratt Aug 21, 2026
17438c2
Rollup merge of #161351 - fmease:mv-impl-dump-obj-lt-defs, r=Jonathan…
jhpratt Aug 21, 2026
8abcab5
Rollup merge of #161355 - bjorn3:archive_error_message, r=mu001999
jhpratt Aug 21, 2026
636dec4
Rollup merge of #161373 - JonathanBrouwer:ec2-local, r=Mark-Simulacrum
jhpratt Aug 21, 2026
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
48 changes: 24 additions & 24 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6320,9 +6320,9 @@ dependencies = [

[[package]]
name = "wasm-component-ld"
version = "0.5.27"
version = "0.5.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fd1ba338b2c06654988a76b13f38cad9a1c738e3275bf71ecf70eeac5d98eb4"
checksum = "baf08212b996e5acc1338cb354247de0d7cd82ada2e6568cdc5a662a998fddbd"
dependencies = [
"anyhow",
"clap",
Expand All @@ -6331,7 +6331,7 @@ dependencies = [
"libc",
"tempfile",
"wasi-preview1-component-adapter-provider",
"wasmparser 0.254.0",
"wasmparser 0.257.1",
"wat",
"windows-sys 0.61.2",
"winsplit",
Expand All @@ -6358,24 +6358,24 @@ dependencies = [

[[package]]
name = "wasm-encoder"
version = "0.254.0"
version = "0.257.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09480d646178e5fdd12bb06e812d0af9a3a191dbc9cd697fdc86687beade7393"
checksum = "7d8ad9f0a39050867bda22e6486c316e2e52d20a42154d5bc433934bf738d085"
dependencies = [
"leb128fmt",
"wasmparser 0.254.0",
"wasmparser 0.257.1",
]

[[package]]
name = "wasm-metadata"
version = "0.254.0"
version = "0.257.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b01df5f3b4ca7881e843f3bc0fb8a3905d79c68692250dcb8e33e698705ccdb6"
checksum = "57460ad9bce753e8a80d47a445cb87c8724ea57f463d9c906a947c41032ce1ac"
dependencies = [
"anyhow",
"indexmap",
"wasm-encoder 0.254.0",
"wasmparser 0.254.0",
"wasm-encoder 0.257.1",
"wasmparser 0.257.1",
]

[[package]]
Expand All @@ -6391,9 +6391,9 @@ dependencies = [

[[package]]
name = "wasmparser"
version = "0.254.0"
version = "0.257.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5769a29f799fbab136aaf65b4fe5384cd7d93fe6fc9ba0dcb6c8382a1f16e27"
checksum = "d92fc335fb6d48f46bda1d8b26b69e28320c15ac3272208333833d6e217e2b4a"
dependencies = [
"bitflags",
"hashbrown",
Expand All @@ -6404,22 +6404,22 @@ dependencies = [

[[package]]
name = "wast"
version = "254.0.0"
version = "257.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7ed4dfc8f6b9fc38b231065e2cdfbf7359af5ab945990abf09658dcc63c3e32"
checksum = "3c416ee8044cf88c5280e3d87c322b009525eb25142cf7428f0a90ea88febc3b"
dependencies = [
"bumpalo",
"leb128fmt",
"memchr",
"unicode-width 0.2.2",
"wasm-encoder 0.254.0",
"wasm-encoder 0.257.1",
]

[[package]]
name = "wat"
version = "1.254.0"
version = "1.257.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7127f7f9b8f127c879991cecd35f494e4628bae1b0874c681414d8d8831e952c"
checksum = "672e5495f00c5fc6c6b502205bae4708aa4dd13d969754438743afe0a8af0f1d"
dependencies = [
"wast",
]
Expand Down Expand Up @@ -6791,9 +6791,9 @@ dependencies = [

[[package]]
name = "wit-component"
version = "0.254.0"
version = "0.257.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0e65bb94c369b3c4741ce3d1d2704b1fec93db7c540df0e521a097e7ceeb5be"
checksum = "2e8b7d04a4c9491ffea354923ed70c8826d52c699fe20a52e8ceca95017dddb8"
dependencies = [
"anyhow",
"bitflags",
Expand All @@ -6802,17 +6802,17 @@ dependencies = [
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.254.0",
"wasm-encoder 0.257.1",
"wasm-metadata",
"wasmparser 0.254.0",
"wasmparser 0.257.1",
"wit-parser",
]

[[package]]
name = "wit-parser"
version = "0.254.0"
version = "0.257.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1655131e4f7d3f0cb141f6eca71315ca40eff0f3d4de7cff0a82bacedd8c89b4"
checksum = "6f815340f0bb65d9775ae21e56b503b496683557b9b627b195d2766c25fb24ae"
dependencies = [
"anyhow",
"hashbrown",
Expand All @@ -6824,7 +6824,7 @@ dependencies = [
"serde_derive",
"serde_json",
"unicode-ident",
"wasmparser 0.254.0",
"wasmparser 0.257.1",
]

[[package]]
Expand Down
26 changes: 17 additions & 9 deletions compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,20 @@ fn generate_launcher<'ll>(cx: &CodegenCx<'ll, '_>) -> (&'ll llvm::Value, &'ll ll
(tgt_decl, tgt_fn_ty)
}

/// Declares the `omp_get_num_devices` runtime function and returns the
/// declaration together with its type.
pub(crate) fn declare_omp_get_num_devices<'ll>(
cx: &CodegenCx<'ll, '_>,
) -> (&'ll llvm::Value, &'ll llvm::Type) {
let ti32 = cx.type_i32();
let tgt_fn_ty = cx.type_func(&[], ti32);
let name = "omp_get_num_devices";
let tgt_decl = declare_offload_fn(&cx, name, tgt_fn_ty);
let nounwind = llvm::AttributeKind::NoUnwind.create_attr(cx.llcx);
attributes::apply_to_llfn(tgt_decl, Function, &[nounwind]);
(tgt_decl, tgt_fn_ty)
}

// What is our @1 here? A magic global, used in our data_{begin/update/end}_mapper:
// @0 = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00", align 1
// @1 = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 22, ptr @0 }, align 8
Expand Down Expand Up @@ -591,6 +605,7 @@ pub(crate) fn gen_call_handling<'ll, 'tcx>(
offload_globals: &OffloadGlobals<'ll>,
offload_dims: &OffloadKernelDims<'ll>,
dyn_cache: &'ll Value,
device_id: &'ll Value,
) {
let cx = builder.cx;
let OffloadKernelGlobals {
Expand Down Expand Up @@ -775,15 +790,8 @@ pub(crate) fn gen_call_handling<'ll, 'tcx>(
builder.store(value.2, ptr, value.0);
}

let args = vec![
s_ident_t,
// FIXME(offload) give users a way to select which GPU to use.
cx.get_const_i64(u64::MAX), // MAX == -1.
num_workgroups,
threads_per_block,
region_id,
a5,
];
let device_id = builder.sext(device_id, cx.type_i64());
let args = vec![s_ident_t, device_id, num_workgroups, threads_per_block, region_id, a5];
builder.call(tgt_target_kernel_ty, None, None, tgt_decl, &args, None, None);
// %41 = call i32 @__tgt_target_kernel(ptr @1, i64 -1, i32 2097152, i32 256, ptr @.kernel_1.region_id, ptr %kernel_args)

Expand Down
21 changes: 17 additions & 4 deletions compiler/rustc_codegen_llvm/src/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use crate::abi::FnAbiLlvmExt;
use crate::builder::Builder;
use crate::builder::autodiff::{adjust_activity_to_abi, generate_enzyme_call};
use crate::builder::gpu_offload::{
OffloadKernelDims, gen_call_handling, gen_define_handling, register_offload,
self, OffloadKernelDims, declare_omp_get_num_devices, register_offload,
};
use crate::context::CodegenCx;
use crate::declare::declare_raw_fn;
Expand Down Expand Up @@ -241,6 +241,13 @@ impl<'ll, 'tcx> IntrinsicCallBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
// offload *has* a return type, but somehow works without mentioning the place
return IntrinsicResult::WroteIntoPlace;
}
sym::offload_get_num_devices => {
let (fn_decl, fn_ty) = declare_omp_get_num_devices(self.cx);

let llval = self.call(fn_ty, None, None, fn_decl, &[], None, None);

return IntrinsicResult::Operand(OperandValue::Immediate(llval));
},
sym::is_val_statically_known => {
if let OperandValue::Immediate(imm) = args[0].val {
self.call_intrinsic(
Expand Down Expand Up @@ -1851,7 +1858,11 @@ fn codegen_offload<'ll, 'tcx>(
OperandValue::Immediate(val) => val,
_ => panic!("unparsable"),
};
let args = get_args_from_tuple(bx, args[4], fn_target);
let device_id = match args[4].val {
OperandValue::Immediate(val) => val,
_ => panic!("unparsable"),
};
let args = get_args_from_tuple(bx, args[5], fn_target);
let target_symbol = mangle_offload_export(tcx, fn_target);

let sig = tcx.fn_sig(fn_target.def_id()).instantiate(tcx, fn_target.args).skip_norm_wip();
Expand Down Expand Up @@ -1882,8 +1893,9 @@ fn codegen_offload<'ll, 'tcx>(
}
};
register_offload(cx);
let offload_data = gen_define_handling(&cx, &metadata, target_symbol, offload_globals);
gen_call_handling(
let offload_data =
gpu_offload::gen_define_handling(&cx, &metadata, target_symbol, offload_globals);
gpu_offload::gen_call_handling(
bx,
&offload_data,
&args,
Expand All @@ -1892,6 +1904,7 @@ fn codegen_offload<'ll, 'tcx>(
offload_globals,
&offload_dims,
&dyn_cache,
&device_id,
);
}

Expand Down
20 changes: 14 additions & 6 deletions compiler/rustc_codegen_ssa/src/back/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,9 @@ impl<'a> ArArchiveBuilder<'a> {
io::Error::new(
io::ErrorKind::InvalidData,
format!(
"archive member at offset {start} with size {} \
"archive member of {} at offset {start} with size {} \
exceeds archive size {} in `{}`",
src_archive.0.display(),
file_range.1,
archive_data.len(),
src_archive.0.display(),
Expand All @@ -642,11 +643,18 @@ impl<'a> ArArchiveBuilder<'a> {
}
}
ArchiveEntrySource::File(file) => unsafe {
let mmap = Mmap::map(
File::open(file)
.map_err(|err| io_error_context("failed to open object file", err))?,
)
.map_err(|err| io_error_context("failed to map object file", err))?;
let mmap = Mmap::map(File::open(&file).map_err(|err| {
io_error_context(
&format!("failed to open object file {}", file.display()),
err,
)
})?)
.map_err(|err| {
io_error_context(
&format!("failed to map object file {}", file.display()),
err,
)
})?;
if entry.kind == ArchiveEntryKind::RustObj
&& let Some(sym) = &symbols
{
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_ssa/src/mir/intrinsic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
| sym::atomic_fence
| sym::atomic_singlethreadfence
| sym::caller_location
| sym::offload_get_num_devices
| sym::return_address => {}
_ => {
span_bug!(
Expand Down
Loading
Loading