Open japaric opened 8 years ago
Thanks for the investigation @japaric! I suspect that +soft-float
only makes sense for something like ARM targets (or may be anything not x86) or something like that. We should definitely have a better error here.
or may be anything not x86
I just remember that x86 kernel devs routinely use +soft-float but with other codegen options: something like "-fxsr,-mmx,-sse,-sse2,+soft-float". Perhaps, on x86, you have to use that specific combination of codegen options or you'll hit an LLVM assertion?
Oh right yeah I remember that now, seems reasonable for a soft-float request to imply those features on x86 to me
Found using smoke. (cc @brson)
Smoke is a "cross" testing framework. It runs different tests, like the unit tests of the standard crates, for several targets. I wanted to see how setting
-C target-feature=+soft-float
affected a single test case but decided to set it viaRUSTFLAGS
for funto see how it affected all the tests it runs. To my surprise, on 6 of 10 targets, this resulted in LLVM assertions while compiling one or two of the many tests that smoke runs. Here's the summary:i686-apple-darwin
Assertion: "Should only be an extending load, not truncating!"x86_64-apple-darwin
Assertion: "This value type is not natively supported!"i686-unknown-linux-gnu
Assertion: "Should only be an extending load, not truncating!"i686-unknown-linux-musl
Assertion: "Should only be an extending load, not truncating!"x86_64-unknown-linux-gnu
Assertion: "This value type is not natively supported!"x86_64-unknown-linux-musl
Assertion: "This value type is not natively supported!"mips-unknown-linux-gnu
OKmipsel-unknown-linux-gnu
OKpowerpc-unknown-linux-gnu
OKpowerpc64-unknown-linux-gnu
OKAnd below it's a more detailed report of how the assertion was triggered:
i686-apple-darwin
i686-unknown-linux-gnu
i686-unknown-linux-musl
Travis build job for i686-apple-darwin Travis build job for i686-unknown-linux-gnu Travis build job for i686-unknown-linux-musl
Command:
On this rust-lang/libc checkout.
Assertion:
x86_64-apple-darwin
x86_64-unknown-linux-gnu
x86_64-unknown-linux-musl
Travis build job for x86_64-apple-darwin Travis build job for x86_64-unknown-linux-gnu Travis build job for x86_64-unknown-linux-musl
Command:
On this Cargo repository.
Assertion:
NOTE
cargo test --target $TARGET --release
didn't result in a LLVM assertion.x86_64-unknown-linux-gnu
andx86_64-unknown-linux-musl
also failed thelibc
test mentioned in the previous section but with a different LLVM assertion:Meta
Final thoughts
I think these assertions could either:
+soft-float
). When we have a Cargo that can buildstd
and (libtest
), I should re-run these tests to discard that possibility (std
would be recompiled with+soft-float
).+soft-float
for some targets for some reason.