diff --git a/prelude/rust/link_info.bzl b/prelude/rust/link_info.bzl index aa875ba5..49f9c4b4 100644 --- a/prelude/rust/link_info.bzl +++ b/prelude/rust/link_info.bzl @@ -228,6 +228,18 @@ def gather_explicit_sysroot_deps(dep_ctx: DepCollectionContext) -> list[RustOrNa name = None, flags = ["nounused"] + flags, )) + if explicit_sysroot_deps.panic_unwind: + out.append(RustOrNativeDependency( + dep = explicit_sysroot_deps.panic_unwind, + name = None, + flags = ["nounused"], + )) + if explicit_sysroot_deps.panic_abort: + out.append(RustOrNativeDependency( + dep = explicit_sysroot_deps.panic_abort, + name = None, + flags = ["nounused"], + )) for d in explicit_sysroot_deps.others: # FIXME(JakobDegen): Ideally we would not be using `noprelude` here but # instead report these as regular transitive dependencies. However, diff --git a/prelude/rust/rust_toolchain.bzl b/prelude/rust/rust_toolchain.bzl index 0189ff82..caacdbc6 100644 --- a/prelude/rust/rust_toolchain.bzl +++ b/prelude/rust/rust_toolchain.bzl @@ -22,6 +22,8 @@ RustExplicitSysrootDeps = record( core = Dependency | None, proc_macro = Dependency | None, std = Dependency | None, + panic_unwind = Dependency | None, + panic_abort = Dependency | None, others = list[Dependency], )