Skip to content
Snippets Groups Projects
Commit 903b989b authored by Andreas Klebinger's avatar Andreas Klebinger
Browse files

Fix fma warning when using llvm on aarch64.

On aarch64 fma is always on so the +fma flag doesn't exist for that
target. Hence no need to try and pass +fma to llvm.

Fixes #24379
parent 699da01b
No related merge requests found
......@@ -950,6 +950,7 @@ llvmOptions llvm_config dflags =
| otherwise = "static"
platform = targetPlatform dflags
arch = platformArch platform
attrs :: String
attrs = intercalate "," $ mattr
......@@ -962,7 +963,8 @@ llvmOptions llvm_config dflags =
++ ["+avx512cd"| isAvx512cdEnabled dflags ]
++ ["+avx512er"| isAvx512erEnabled dflags ]
++ ["+avx512pf"| isAvx512pfEnabled dflags ]
++ ["+fma" | isFmaEnabled dflags ]
-- For Arch64 +fma is not a option (it's unconditionally available).
++ ["+fma" | isFmaEnabled dflags && (arch /= ArchAArch64) ]
++ ["+bmi" | isBmiEnabled dflags ]
++ ["+bmi2" | isBmi2Enabled dflags ]
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment