You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building a Rust project that uses the cc crate (version 1.2.17) for the aarch64-unknown-none-softfloat target, the build fails if clang is used as the C compiler.
The error message from clang is:
clang: error: version 'softfloat' in target triple 'aarch64-unknown-none-softfloat' is invalid
The cc crate appears to be invoking clang with the full target triple --target=aarch64-unknown-none-softfloat. It seems that some versions of clang do not accept the softfloat version string within the target triple for this architecture.
Steps to Reproduce (based on our experience):
Use a build.rs script that utilizes the cc crate (version 1.2.17).
Set the build target to aarch64-unknown-none-softfloat (either through environment variables like TARGET or by calling build.target() in the build script).
Ensure clang is selected as the C compiler (e.g., env::set_var("CC", "clang"); in build.rs or via environment variable).
Run cargo build --target aarch64-unknown-none-softfloat.