From 8931e4b417d14e257b7afe0ec00cb5ba56d3208f Mon Sep 17 00:00:00 2001
Date: Mon, 17 May 2021 17:46:27 -0700
Subject: [PATCH 20/24] 10.6 and less work around no directory watcher before
 10.7

---
 clang/lib/DirectoryWatcher/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clang/lib/DirectoryWatcher/CMakeLists.txt b/clang/lib/DirectoryWatcher/CMakeLists.txt
index 5a8796982113..d826529026fb 100644
--- a/clang/lib/DirectoryWatcher/CMakeLists.txt
+++ b/clang/lib/DirectoryWatcher/CMakeLists.txt
@@ -5,7 +5,7 @@ set(LLVM_LINK_COMPONENTS support)
 set(DIRECTORY_WATCHER_SOURCES DirectoryScanner.cpp)
 set(DIRECTORY_WATCHER_LINK_LIBS "")
 
-if(APPLE)
+if(APPLE AND (CMAKE_OSX_DEPLOYMENT_TARGET GREATER_EQUAL 10.7))
   check_include_files("CoreServices/CoreServices.h" HAVE_CORESERVICES)
   if(HAVE_CORESERVICES)
     list(APPEND DIRECTORY_WATCHER_SOURCES mac/DirectoryWatcher-mac.cpp)
-- 
2.21.1 (Apple Git-122.3)

