Skip to content

Commit 036239e

Browse files
committed
Update to nightly-2025-08-04.
- `tcx.get_attrs_unchecked(...)` was replaced with `tcx.get_all_attrs(...)`. - `run_link` has been removed. - `BuilderMethods::tail_call` was added. It's currently `todo!()`. - And update to glam 0.30.8.
1 parent af787cc commit 036239e

File tree

6 files changed

+21
-23
lines changed

6 files changed

+21
-23
lines changed

crates/rustc_codegen_spirv/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ use std::{env, fs, mem};
1818
/// `cargo publish`. We need to figure out a way to do this properly, but let's hardcode it for now :/
1919
//const REQUIRED_RUST_TOOLCHAIN: &str = include_str!("../../rust-toolchain.toml");
2020
const REQUIRED_RUST_TOOLCHAIN: &str = r#"[toolchain]
21-
channel = "nightly-2025-07-28"
21+
channel = "nightly-2025-08-04"
2222
components = ["rust-src", "rustc-dev", "llvm-tools"]
23-
# commit_hash = f8e355c230c6eb7b78ffce6a92fd81f78c890524"#;
23+
# commit_hash = f34ba774c78ea32b7c40598b8ad23e75cdac42a6"#;
2424

2525
fn rustc_output(arg: &str) -> Result<String, Box<dyn Error>> {
2626
let rustc = env::var("RUSTC").unwrap_or_else(|_| "rustc".into());

crates/rustc_codegen_spirv/src/abi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ impl<'tcx> ConvSpirvType<'tcx> for TyAndLayout<'tcx> {
286286
span = cx.tcx.def_span(adt.did());
287287
}
288288

289-
let attrs = AggregatedSpirvAttributes::parse(cx, cx.tcx.get_attrs_unchecked(adt.did()));
289+
let attrs = AggregatedSpirvAttributes::parse(cx, cx.tcx.get_all_attrs(adt.did()));
290290

291291
if let Some(intrinsic_type_attr) = attrs.intrinsic_type.map(|attr| attr.value)
292292
&& let Ok(spirv_type) =

crates/rustc_codegen_spirv/src/builder/builder_methods.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4160,6 +4160,19 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
41604160
.with_type(result_type)
41614161
}
41624162

4163+
fn tail_call(
4164+
&mut self,
4165+
_llty: Self::Type,
4166+
_fn_attrs: Option<&CodegenFnAttrs>,
4167+
_fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
4168+
_llfn: Self::Value,
4169+
_args: &[Self::Value],
4170+
_funclet: Option<&Self::Funclet>,
4171+
_instance: Option<ty::Instance<'tcx>>,
4172+
) {
4173+
todo!()
4174+
}
4175+
41634176
fn zext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value {
41644177
self.intcast(val, dest_ty, false)
41654178
}

crates/rustc_codegen_spirv/src/codegen_cx/declare.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::spirv_type::SpirvType;
1010
use itertools::Itertools;
1111
use rspirv::spirv::{FunctionControl, LinkageType, StorageClass, Word};
1212
use rustc_abi::Align;
13-
use rustc_attr_data_structures::InlineAttr;
1413
use rustc_codegen_ssa::traits::{PreDefineCodegenMethods, StaticCodegenMethods};
14+
use rustc_hir::attrs::InlineAttr;
1515
use rustc_middle::bug;
1616
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
1717
use rustc_middle::mir::mono::{Linkage, MonoItem, Visibility};
@@ -133,7 +133,7 @@ impl<'tcx> CodegenCx<'tcx> {
133133
self.set_linkage(fn_id, symbol_name.to_owned(), linkage);
134134
}
135135

136-
let attrs = AggregatedSpirvAttributes::parse(self, self.tcx.get_attrs_unchecked(def_id));
136+
let attrs = AggregatedSpirvAttributes::parse(self, self.tcx.get_all_attrs(def_id));
137137
if let Some(entry) = attrs.entry.map(|attr| attr.value) {
138138
// HACK(eddyb) early insert to let `shader_entry_stub` call this
139139
// very function via `get_fn_addr`.
@@ -167,7 +167,7 @@ impl<'tcx> CodegenCx<'tcx> {
167167
}
168168

169169
// Check if this is a From trait implementation
170-
if let Some(impl_def_id) = self.tcx.impl_of_method(def_id)
170+
if let Some(impl_def_id) = self.tcx.impl_of_assoc(def_id)
171171
&& let Some(trait_ref) = self.tcx.impl_trait_ref(impl_def_id)
172172
{
173173
let trait_def_id = trait_ref.skip_binder().def_id;

crates/rustc_codegen_spirv/src/lib.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -332,21 +332,6 @@ impl WriteBackendMethods for SpirvCodegenBackend {
332332
type ThinData = ();
333333
type ThinBuffer = SpirvModuleBuffer;
334334

335-
// FIXME(eddyb) reuse the "merge" stage of `crate::linker` for this, or even
336-
// delegate to `run_and_optimize_fat_lto` (although `-Zcombine-cgu` is much more niche).
337-
fn run_link(
338-
cgcx: &CodegenContext<Self>,
339-
diag_handler: DiagCtxtHandle<'_>,
340-
_modules: Vec<ModuleCodegen<Self::Module>>,
341-
) -> Result<ModuleCodegen<Self::Module>, FatalError> {
342-
assert!(
343-
cgcx.opts.unstable_opts.combine_cgu,
344-
"`run_link` (for `WorkItemResult::NeedsLink`) should \
345-
only be invoked due to `-Zcombine-cgu`"
346-
);
347-
diag_handler.fatal("Rust-GPU does not support `-Zcombine-cgu`")
348-
}
349-
350335
// FIXME(eddyb) reuse the "merge" stage of `crate::linker` for this, or even
351336
// consider setting `requires_lto = true` in the target specs and moving the
352337
// entirety of `crate::linker` into this stage (lacking diagnostics may be

rust-toolchain.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[toolchain]
2-
channel = "nightly-2025-07-28"
2+
channel = "nightly-2025-08-04"
33
components = ["rust-src", "rustc-dev", "llvm-tools"]
4-
# commit_hash = f8e355c230c6eb7b78ffce6a92fd81f78c890524
4+
# commit_hash = f34ba774c78ea32b7c40598b8ad23e75cdac42a6
55

66
# Whenever changing the nightly channel, update the commit hash above, and
77
# change `REQUIRED_RUST_TOOLCHAIN` in `crates/rustc_codegen_spirv/build.rs` too.

0 commit comments

Comments
 (0)