From 74dda39256362d98a74fefeddfea344b9d34b681 Mon Sep 17 00:00:00 2001
From: "Kirill A. Korinsky" <kirill@korins.ky>
Date: Wed, 17 Aug 2022 15:11:27 +0200
Subject: [PATCH] disable DirectoryWatcher when builds by GCC

---
 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..0a0111c3829d 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 NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU")
   check_include_files("CoreServices/CoreServices.h" HAVE_CORESERVICES)
   if(HAVE_CORESERVICES)
     list(APPEND DIRECTORY_WATCHER_SOURCES mac/DirectoryWatcher-mac.cpp)
-- 
2.37.2

