Browse Source
The Rust compiler validates the extern ABI while parsing the "extern" keyword, so normal conditional compilation (`#[cfg(...)]`) isn't enough to hide the ABI from Rust versions which don't know it. I tried hiding the extern ABI using a macro, but the contents of an "extern" block aren't a valid `item`, and I couldn't find any other working way to pass the function declarations to the macro. The solution which worked in the end was to use `include!`. This prevents the compiler from even trying to parse the "extern" block unless the nightly-only cargo feature "simd" is enabled.pull/2/head
![cesarb@cesarb.eti.br](/assets/img/avatar_default.png)
2 changed files with 4 additions and 3 deletions
Loading…
Reference in new issue