1
Fork 0

Add the no-builtins attribute to functions when no_builtins is applied at the crate level.

When `no_builtins` is applied at the crate level, we should add the
`no-builtins` attribute to each function to ensure it takes effect in LTO.
This commit is contained in:
DianQK 2023-07-18 22:15:47 +08:00
parent f0580df0d5
commit cc08749df2
No known key found for this signature in database
GPG key ID: 46BDB1AC96C48912
8 changed files with 68 additions and 1 deletions

View file

@ -100,6 +100,8 @@ bitflags! {
const REALLOCATOR = 1 << 18;
/// `#[rustc_allocator_zeroed]`: a hint to LLVM that the function only allocates zeroed memory.
const ALLOCATOR_ZEROED = 1 << 19;
/// `#[no_builtins]`: indicates that disable implicit builtin knowledge of functions for the function.
const NO_BUILTINS = 1 << 20;
}
}