summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-09-07 01:36:47 +0000
committerVedant Kumar <vsk@apple.com>2017-09-07 01:36:47 +0000
commitb6d2fe5c88c05d1d8f1b6f9341fdc6a44b8ca550 (patch)
tree3e0404afc745dd0387737e15171a5d206e46fe8c
parent7d1ab555ae252296cca1c41f79046590086879a2 (diff)
downloadbcm5719-llvm-b6d2fe5c88c05d1d8f1b6f9341fdc6a44b8ca550.tar.gz
bcm5719-llvm-b6d2fe5c88c05d1d8f1b6f9341fdc6a44b8ca550.zip
[cmake] Work around more -Wunused-driver-argument warnings
add_compiler_rt_object_libraries should strip out the -msse3 option on non-macOS Apple platforms. llvm-svn: 312688
-rw-r--r--compiler-rt/cmake/Modules/AddCompilerRT.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler-rt/cmake/Modules/AddCompilerRT.cmake b/compiler-rt/cmake/Modules/AddCompilerRT.cmake
index 622292edece..700c31f16f0 100644
--- a/compiler-rt/cmake/Modules/AddCompilerRT.cmake
+++ b/compiler-rt/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")
OpenPOWER on IntegriCloud