Turning off fused floating-point operations

It seems that Loongson 3A's FPU has buggy fused operations. This causes librsvg's test suite to fail, and has also caused rustc's tests to fail. I'm looking for a way to disable them in codegen.

I found clang's -ffp-contract=off option and would like to try building librsvg with something equivalent to it, but it's maybe a clang-only option, not something that can be passed with -C llvm-args=... - the following didn't work:

$ RUSTFLAGS="-C llvm-args=-ffp-contract=off" cargo build
error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -C llvm-args=-ffp-contract=off --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
rustc: Unknown command line argument '-ffp-contract=off'.  Try: 'rustc --help'
rustc: Did you mean '--spp-no-entry=off'?

Does anyone know how to enable an equivalent option for compilation, to disable fused floating-point operations?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.