diff options
author | Vedant Kumar <vsk@apple.com> | 2017-09-01 23:23:59 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2017-09-01 23:23:59 +0000 |
commit | 160179b335b9dd2c22b151e5eb0aff983db202db (patch) | |
tree | b5ebe8a243ee4b79df3af6ca7758eeacd879b562 /cmake/Modules/AddCompilerRT.cmake | |
parent | 665cb4327b786b6869753488a69b9993373110ef (diff) |
[cmake] Work around -Wunused-driver-argument warnings
Fix the Darwin logic so that -msse3 is only used on macOS, and
-fomit-frame-pointer is not used on armv7/armv7k/armv7s.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312390 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/Modules/AddCompilerRT.cmake')
-rw-r--r-- | cmake/Modules/AddCompilerRT.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake index 64a8e0368..032b43723 100644 --- a/cmake/Modules/AddCompilerRT.cmake +++ b/cmake/Modules/AddCompilerRT.cmake @@ -125,8 +125,16 @@ function(add_compiler_rt_runtime name type) else() set(NO_LTO_FLAGS "") endif() + if(APPLE) foreach(os ${LIB_OS}) + # Strip out -msse3 if this isn't macOS. + message(WARNING "BEFORE: ${LIB_CFLAGS}") + list(LENGTH LIB_CFLAGS HAS_EXTRA_CFLAGS) + if(HAS_EXTRA_CFLAGS AND NOT "${os}" MATCHES "^(osx)$") + list(REMOVE_ITEM LIB_CFLAGS "-msse3") + endif() + message(WARNING "AFTER: ${LIB_CFLAGS}") if(type STREQUAL "STATIC") set(libname "${name}_${os}") else() |