aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@ributzka.de>2017-08-28 23:04:38 +0000
committerJuergen Ributzka <juergen@ributzka.de>2017-08-28 23:04:38 +0000
commitcf4d263198109e530278ed2ffe0d70935abcb340 (patch)
tree1632efe89abc621106c1b517da62af121fc22fb0 /cmake/modules
parent0827f9ac83209d6e44e2c4e537ec508029b53599 (diff)
downloadllvm-cf4d263198109e530278ed2ffe0d70935abcb340.tar.gz
Fix cmake check for futimens when deploying to earlier macOS releases.
macOS 10.13 added a new API (futimens). This API is only available on macOS 10.13 and later, but the cmake check we have in place only tests if the symbol is present and ignores the availability attribute. Luckily we have new warning for this and by making this warning an error the cmake check will return the correct result. See also rdar://problem/33992750. Differential Revision: https://reviews.llvm.org/D37027 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake/modules')
-rw-r--r--cmake/modules/HandleLLVMOptions.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
index 04596a6ff63..a2ab1283808 100644
--- a/cmake/modules/HandleLLVMOptions.cmake
+++ b/cmake/modules/HandleLLVMOptions.cmake
@@ -383,6 +383,7 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append_if(LLVM_ENABLE_WERROR "-Wno-error" CMAKE_REQUIRED_FLAGS)
add_flag_if_supported("-Werror=date-time" WERROR_DATE_TIME)
+ add_flag_if_supported("-Werror=unguarded-availability-new" WERROR_UNGUARDED_AVAILABILITY_NEW)
if (LLVM_ENABLE_CXX1Y)
check_cxx_compiler_flag("-std=c++1y" CXX_SUPPORTS_CXX1Y)
append_if(CXX_SUPPORTS_CXX1Y "-std=c++1y" CMAKE_CXX_FLAGS)