summaryrefslogtreecommitdiffstats
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
commit1d4e04976afe52a36bf8f7c4009682d53fd4fee8 (patch)
tree391774d2499aa71cc885efa1809c4fe337ba0f1e
parent4846e66fdd510349d1fbd1c60b9f882a5b3ff585 (diff)
downloadbcm5719-llvm-1d4e04976afe52a36bf8f7c4009682d53fd4fee8.tar.gz
bcm5719-llvm-1d4e04976afe52a36bf8f7c4009682d53fd4fee8.zip
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 llvm-svn: 311949
-rw-r--r--llvm/cmake/config-ix.cmake1
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake1
2 files changed, 2 insertions, 0 deletions
diff --git a/llvm/cmake/config-ix.cmake b/llvm/cmake/config-ix.cmake
index f777b9c1c14..96a88aaa9ba 100644
--- a/llvm/cmake/config-ix.cmake
+++ b/llvm/cmake/config-ix.cmake
@@ -13,6 +13,7 @@ include(TestBigEndian)
include(CheckCompilerVersion)
include(HandleLLVMStdlib)
+include(HandleLLVMOptions)
if( UNIX AND NOT (BEOS OR HAIKU) )
# Used by check_symbol_exists:
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 04596a6ff63..a2ab1283808 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/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)
OpenPOWER on IntegriCloud