[llvm] 69ead94 - [llvm] Enable building Analysis plugins on windows (#112303)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 26 03:15:40 PDT 2024


Author: Thomas Fransham
Date: 2024-10-26T13:15:37+03:00
New Revision: 69ead949d08ff0bb8cbbf4f7143aaa6687830f6b

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

LOG: [llvm] Enable building Analysis plugins on windows (#112303)

Enable building InlineAdvisorPlugin and InlineOrderPlugin on windows for
shared library builds.

This is part of the work to enable LLVM_BUILD_LLVM_DYLIB and LLVM
plugins on window.

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 22cd0cb1d9a034..deabf110f2e439 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 AND NOT CYGWIN)
+if ((NOT WIN32 OR LLVM_BUILD_LLVM_DYLIB) AND NOT CYGWIN)
   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 cc470a934426d5..0b37cebe3da6de 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 AND NOT CYGWIN)
+if ((NOT WIN32 OR LLVM_BUILD_LLVM_DYLIB) AND NOT CYGWIN)
   unset(LLVM_LINK_COMPONENTS)
   add_llvm_library(InlineOrderPlugin MODULE BUILDTREE_ONLY
     InlineOrderPlugin.cpp


        


More information about the llvm-commits mailing list