[llvm] e5402c9 - [llvm] Enable building Analysis plugins on Cygwin (#151397)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 31 10:41:05 PDT 2025


Author: jeremyd2019
Date: 2025-07-31T10:41:02-07:00
New Revision: e5402c977f5a2eeae037103d2fd68df10d5c6650

URL: https://github.com/llvm/llvm-project/commit/e5402c977f5a2eeae037103d2fd68df10d5c6650
DIFF: https://github.com/llvm/llvm-project/commit/e5402c977f5a2eeae037103d2fd68df10d5c6650.diff

LOG: [llvm] Enable building Analysis plugins on Cygwin (#151397)

In #112303 they were enabled for Windows dylib builds, but the condition
excluded Cygwin in that case. Their dynamic libraries work the same way,
so adjust the condition accordingly.

This fixes the plugin tests on Cygwin.

Added: 
    

Modified: 
    llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
    llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt b/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
index deabf110f2e43..d9da627ad52e3 100644
--- a/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
+++ b/llvm/unittests/Analysis/InlineAdvisorPlugin/CMakeLists.txt
@@ -2,7 +2,7 @@
 # libraries, but expects them to exist in the process loading the plugin. This 
 # doesn't work with DLLs on Windows (where a shared library can't have undefined
 # references), so just skip this testcase on Windows.
-if ((NOT WIN32 OR LLVM_BUILD_LLVM_DYLIB) AND NOT CYGWIN)
+if ((NOT WIN32 AND NOT CYGWIN) OR LLVM_BUILD_LLVM_DYLIB)
   unset(LLVM_LINK_COMPONENTS)
   add_llvm_library(InlineAdvisorPlugin MODULE BUILDTREE_ONLY
     InlineAdvisorPlugin.cpp

diff  --git a/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt b/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
index 0b37cebe3da6d..941e18efc1a52 100644
--- a/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
+++ b/llvm/unittests/Analysis/InlineOrderPlugin/CMakeLists.txt
@@ -2,7 +2,7 @@
 # libraries, but expects them to exist in the process loading the plugin. This 
 # doesn't work with DLLs on Windows (where a shared library can't have undefined
 # references), so just skip this testcase on Windows.
-if ((NOT WIN32 OR LLVM_BUILD_LLVM_DYLIB) AND NOT CYGWIN)
+if ((NOT WIN32 AND NOT CYGWIN) OR LLVM_BUILD_LLVM_DYLIB)
   unset(LLVM_LINK_COMPONENTS)
   add_llvm_library(InlineOrderPlugin MODULE BUILDTREE_ONLY
     InlineOrderPlugin.cpp


        


More information about the llvm-commits mailing list