build-std + link-dead-code=y cannot build custom target without sse #123494
Labels
-Zbuild-std
Unstable Cargo option: Compile the standard library yourself.
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
O-x86_64
Target: x86-64 processors (like x86_64-*)
requires-nightly
This issue requires a nightly compiler in some way.
Hi,
I am trying to compile my Rust OS kernel for x86_64. As I don't want to implement SSE support for multiple reasons, I chose the
+soft-float
feature. This does not seem to work with build-std:For my features I currently use
I have also tried adding
-sse2
and-avx
with pretty much the same result.Enabling SSE in the custom target works, but of course results in errors at runtime, as I don't actually implement SSE support.
I have found several related issues, but none of them seem to track this specific problem:
#63466 #92760 #62729
#63466 seems to also be referenced by official documentation as known issue, although it is closed and does not seem to track actually fixing the issue.
I have tried the workaround suggested in #62729 without success.
This is my full custom target:
EDIT: Cargo version and rust version
EDIT2: I found out this only happens with
-C link-dead-code=y
, which I require in order to link assembly code. If this option is not set the linker will remove some of the assembly sections.The text was updated successfully, but these errors were encountered: