Skip to content

Cannot compile with thin-lto on MinGW #145

@clubby789

Description

@clubby789

This is a rustc issue, but I thought it might help to be aware of this 🙂
[email protected]+ 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

#[inline(always)]
pub(crate) fn memchr_raw(
n1: u8,
start: *const u8,
end: *const u8,
) -> Option<*const u8> {
// SAFETY: We provide a valid function pointer type.
unsafe_ifunc!(

static FN: AtomicPtr<()> = AtomicPtr::new(detect as Fn);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions