You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This attribute is needed to prevent LLVM from optimizing a memcpy implementation into a recursive call. However this attribute is not preserved in LTO builds: the attribute only works if it is set at the top-level crate.
Since crates containing implementations of built-in functions aren't meant to be called directly, they don't benefit from LTO and should be linked as a separate object.
One workaround (using rlibc as an example) is to first compile a rlibc_inner crate as a staticlib with #![no_builtins], and then compile the rlibc crate as a rlib which links to rlibc_inner.a.