Skip to content

Commit

Permalink
prelude: panic_abort and panic_unwind in explicit sysroot deps
Browse files Browse the repository at this point in the history
Summary: Will need access to these in a future diff, more details to come

Reviewed By: dtolnay

Differential Revision: D52234629

fbshipit-source-id: 761dbc6cced094649c72eceea936e9a930e392df
  • Loading branch information
JakobDegen authored and facebook-github-bot committed Dec 17, 2023
1 parent 7ad1786 commit 3093b3d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions prelude/rust/link_info.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions prelude/rust/rust_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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],
)

Expand Down

0 comments on commit 3093b3d

Please sign in to comment.