Skip to content

Commit

Permalink
Switch to force loading std for panic_handler
Browse files Browse the repository at this point in the history
Summary:
When building buck sysroot from source, `#[no_std]` crates would fail to link as shared libraries, citing "missing #[panic_handler]".

Matt introduced a mechanism in rust-lang/rust#109421 that allows us to still link in the default panic handler from `std`, even if the rest of the crate is completely unused (as is the case with `no_std` crates).

The net result is that we no longer need to force static linkage when building no_std crates with buckified sysroot.

Reviewed By: zertosh

Differential Revision: D47402849

fbshipit-source-id: 35e31c7ff6d5683ff32a3c1eb2d67acec57acc8f
  • Loading branch information
capickett authored and facebook-github-bot committed Jul 14, 2023
1 parent 80a51ba commit 2981ee5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion shim/third-party/rust/fixups/inventory/fixups.toml

This file was deleted.

2 changes: 0 additions & 2 deletions shim/third-party/rust/fixups/libm/fixups.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# #[no_std] cannot be built with shared linkage
preferred_linkage = "static"
buildscript = []

0 comments on commit 2981ee5

Please sign in to comment.