diff options
author | Vedant Kumar <vsk@apple.com> | 2017-09-07 01:36:47 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-09-07 01:36:47 +0000 |
commit | 9c41849040f2c7d0c6d61bd7d1b438d53db617f0 (patch) | |
tree | 3dc53721ae93f9e9de512b14911b3d1d4e18e2bc | |
parent | 89c9356294e3056da335ee04f48e219cb79aa09e (diff) |
[cmake] Work around more -Wunused-driver-argument warnings
add_compiler_rt_object_libraries should strip out the -msse3 option on
non-macOS Apple platforms.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312688 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 622292ede..700c31f16 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -56,8 +56,15 @@ function(add_compiler_rt_object_libraries name) foreach(libname ${libnames}) add_library(${libname} OBJECT ${LIB_SOURCES}) + + # Strip out -msse3 if this isn't macOS. + set(target_flags ${LIB_CFLAGS}) + if(APPLE AND NOT "${libname}" MATCHES ".*\.osx.*") + list(REMOVE_ITEM target_flags "-msse3") + endif() + set_target_compile_flags(${libname} - ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${LIB_CFLAGS}) + ${CMAKE_CXX_FLAGS} ${extra_cflags_${libname}} ${target_flags}) set_property(TARGET ${libname} APPEND PROPERTY COMPILE_DEFINITIONS ${LIB_DEFS}) set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Libraries") |