From 41c52889b90ded563e1aa56cfa7764e083323b00 Mon Sep 17 00:00:00 2001 From: Kuba Brecka Date: Mon, 14 Nov 2016 18:27:47 +0000 Subject: [PATCH] [sanitizer] Max out allowed macOS deployment targets to 10.9 It's not a good idea to build the sanitizers with e.g. -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12, because some deprecated functions that we intercept will cause build errors. Let's limit the allowed deployment targets to 10.9 (which is the default anyway), and warn when it's set above. Differential Revision: https://reviews.llvm.org/D26557 llvm-svn: 286859 --- compiler-rt/cmake/config-ix.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compiler-rt/cmake/config-ix.cmake b/compiler-rt/cmake/config-ix.cmake index cb9f74b..0795a63 100644 --- a/compiler-rt/cmake/config-ix.cmake +++ b/compiler-rt/cmake/config-ix.cmake @@ -217,7 +217,11 @@ if(APPLE) set(SANITIZER_MIN_OSX_VERSION 10.9) endif() if(SANITIZER_MIN_OSX_VERSION VERSION_LESS "10.7") - message(FATAL_ERROR "Too old OS X version: ${SANITIZER_MIN_OSX_VERSION}") + message(FATAL_ERROR "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too old.") + endif() + if(SANITIZER_MIN_OSX_VERSION VERSION_GREATER "10.9") + message(WARNING "macOS deployment target '${SANITIZER_MIN_OSX_VERSION}' is too new, setting to '10.9' instead.") + set(SANITIZER_MIN_OSX_VERSION 10.9) endif() endif() -- 2.7.4