Conversation
|
r? @scottmcm rustbot has assigned @scottmcm. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
|
Cc @bjorn3 who knows a lot about the alloc shims. |
This comment has been minimized.
This comment has been minimized.
|
Imagine the following scenario:
When building liba, we need to already generate the Also cc @anforowicz for Chromium which bypasses the allocator shim. I think it will be fine for you as you include libstd, but I'm not sure if you don't have any no_std executables. It is probably more of an issue for Bazel. |
Thank you for the heads-up.
/cc @DKLoehr from the Chromium Toolchain team as FYI |
|
Given core |
|
I decided to rebase this branch/PR to just include |
This comment has been minimized.
This comment has been minimized.
| /// # Platform-specific behavior | ||
| /// | ||
| /// `abort_immediate` lowers to a trap instruction on *most* architectures; on | ||
| /// some architectures it simply lowers to call the unmangled `abort` function. |
There was a problem hiding this comment.
"unmangled" you mean libc::abort?
There was a problem hiding this comment.
I adapted this wording from the panic-abort crate docs.
extern "C" { #[no_mangle] fn abort() -> !; } will be libc::abort in most cases, yes, but I'm not personally aware of what platforms have what behavior here.
There was a problem hiding this comment.
gotcha. cc @japaric, this PR is heavily based on your panic-abort crate.
There was a problem hiding this comment.
I don't think "unmangled abort" is very clear. Maybe refer to is as "the C abort function" or so.
Implements
core::process::abort_immediateas a wrapper aroundintrinsics::abort.(This PR used to also add
core::process::abort, but that's been deferred to a later addition.)