BurntSushi / memchr

Optimized string search routines for Rust.
The Unlicense
799 stars 97 forks source link

Cannot compile with thin-lto on MinGW #145

Closed clubby789 closed 4 months ago

clubby789 commented 4 months ago

This is a rustc issue, but I thought it might help to be aware of this 🙂 memchr@2.6.0+ does not link when using thin-lto on MinGW, due to the use of #[inline] on functions containing statics. The error this causes when using 2.6+ as a dependency of rustc std can be seen here

https://github.com/BurntSushi/memchr/blob/cedf318090876c6d557f234b158dd4fdc91c41ec/src/arch/x86_64/memchr.rs#L173-L180 https://github.com/BurntSushi/memchr/blob/cedf318090876c6d557f234b158dd4fdc91c41ec/src/arch/x86_64/memchr.rs#L74

BurntSushi commented 4 months ago

Yeah I'm aware. If there's a simple patch to fix this, I'd accept it, but I otherwise don't think it's worth tracking here since it's already tracked on rustc.