sunfishcode / c-ward

An implementation of libc written in Rust
Other
205 stars 11 forks source link

Fix LTO compatibility. #34

Closed sunfishcode closed 1 year ago

sunfishcode commented 1 year ago

#![no_builtins] interferes with LTO, so stop using it. For memcpy etc., we'll just be careful to always call compiler_builtins instead of using plain code that could be pattern-matched.

If we ever want to stop using compiler_builtins, we can use black_box to prevent compilers from pattern-matching.