-
Notifications
You must be signed in to change notification settings - Fork 301
Causes LLVM Error when used in an executable that gets compiled with "+soft-float" #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Flags passed to |
To be exactly, I'm using Therefore, there still must be some bug. |
It works fine for me: Cargo.toml[package]
name = "foo"
version = "0.1.0"
edition = "2018"
[dependencies]
hashbrown = "*"
dlmalloc = { version = "*", features = ["global"] } src/main.rs#![no_std]
#[panic_handler]
fn panic_handler(info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[global_allocator]
static GLOBAL_ALLOC: dlmalloc::GlobalDlmalloc = dlmalloc::GlobalDlmalloc;
#[no_mangle]
pub fn main() {
let _book_reviews = hashbrown::HashMap::<(), ()>::new();
} Command
|
Thanks for taking time on this @Amanieu. I agree that your solution solves the build problem for I created a minimal reproducible example on GitHub in case you are interested: https://github.com/phip1611/rust-llvm-bug-20220112-minimal-example |
Possibly because the simd feature is enabled by default: https://github.com/mooman219/fontdue/blob/a7e02e9e4964e976520722dd2fdb7f8a6a41ad3b/Cargo.toml#L20 |
By the way, there is a pitfall here that confused me at first. The newest If I use |
Uh oh!
There was an error while loading. Please reload this page.
Hi there! I discovered this error originally in the
fontdue
crate (mooman219/fontdue#98 (comment)) and created a Rust bug report yesterday (rust-lang/rust#92760). In the meantime, I found out that the error originates in this library, which is a dependency offontdue
.Minimal example to reproduce:
Compile with
$ cargo rustc --bin bug -- -C target-feature=+soft-float,-sse,-sse2,-x87
Causes a broken compilation and
LLVM ERROR: Do not know how to split this operator's operand!
The bug happens with multiple Rust versions, stable and nightly.
I try to further enclose the actual problem and trace it down to a specific Rust pattern or so. Maybe there will be an easy way to work-a-round this bug in this crate (maybe via a cargo feature) until this bug gets closed in Rustc or LLVM?
The text was updated successfully, but these errors were encountered: