From d56339236d9014c6e78e673df4450c977b04a078 Mon Sep 17 00:00:00 2001 From: Stephen Nicholas Swatman Date: Tue, 17 Oct 2023 00:25:42 +0200 Subject: [PATCH] Disable floating point contraction at link time This commit disables floating point contraction at link time in XCode as this seems to be illegally generating FMA instructions where they should not exist. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d629ebbde..bdfb4647c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,7 @@ if(XCODE) set_target_properties(Vc PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES") set_target_properties(Vc PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x") set_target_properties(Vc PROPERTIES XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") + set_property(TARGET Vc APPEND PROPERTY LINK_OPTIONS "-ffp-contract=off") elseif(UNIX AND Vc_COMPILER_IS_CLANG) # On UNIX (Linux) the standard library used by default typically is libstdc++ (GCC). # To get the full clang deal we rather want to build against libc++. This requires