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

llvm-svn: 249076
This commit is contained in:
Chris Bieneman 2015-10-01 21:21:19 +00:00
parent f92c175bdd
commit f9e0fe77c7
1 changed files with 5 additions and 1 deletions

View File

@ -377,14 +377,18 @@ function(darwin_add_embedded_builtin_libraries)
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})