[CMake] [builtins] [macho_embedded] Don't pass -mfloat-abi=hard flag to x86 because the compiler ignores it and complains.

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@249076 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
index 86c4542..7823523 100644
--- a/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
@@ -377,14 +377,18 @@
       foreach(arch ${DARWIN_${float_type}_FLOAT_ARCHS})
         set(DARWIN_macho_embedded_SYSROOT ${DARWIN_osx_SYSROOT})
         set(DARWIN_macho_embedded_BUILTIN_MIN_VER_FLAG ${DARWIN_osx_BUILTIN_MIN_VER_FLAG})
+        set(float_flag)
         if(${arch} MATCHES "^arm")
           set(DARWIN_macho_embedded_SYSROOT ${DARWIN_ios_SYSROOT})
+          # x86 targets are hard float by default, but the complain about the
+          # float ABI flag, so don't pass it unless we're targeting arm.
+          set(float_flag ${${float_type}_FLOAT_FLAG})
         endif()
         darwin_add_builtin_library(clang_rt ${lib_suffix}
                               OS macho_embedded
                               ARCH ${arch}
                               SOURCES ${${arch}_filtered_sources}
-                              CFLAGS -arch ${arch} ${${type}_FLAG} ${${float_type}_FLOAT_FLAG} ${CFLAGS_${arch}}
+                              CFLAGS -arch ${arch} ${${type}_FLAG} ${float_flag} ${CFLAGS_${arch}}
                               PARENT_TARGET builtins)
       endforeach()
       foreach(lib ${macho_embedded_${lib_suffix}_libs})