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

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 14:21:19 PDT 2015


Author: cbieneman
Date: Thu Oct  1 16:21:19 2015
New Revision: 249076

URL: http://llvm.org/viewvc/llvm-project?rev=249076&view=rev
Log:
[CMake] [builtins] [macho_embedded] Don't pass -mfloat-abi=hard flag to x86 because the compiler ignores it and complains.

Modified:
    compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake

Modified: compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake?rev=249076&r1=249075&r2=249076&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake Thu Oct  1 16:21:19 2015
@@ -377,14 +377,18 @@ function(darwin_add_embedded_builtin_lib
       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})




More information about the llvm-commits mailing list