Skip to content

Commit

Permalink
[NFC] Add llvm-config.h def for LLVM_ENABLE_PLUGINS
Browse files Browse the repository at this point in the history
Snatched from D139644, but because it'd also need a fix in
Passes/CMakeLists.txt, decided to peel it off.
  • Loading branch information
mtrofin committed Dec 16, 2022
1 parent 893a0ea commit 7d2c115
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 3 additions & 0 deletions llvm/include/llvm/Config/llvm-config.h.cmake
Expand Up @@ -123,4 +123,7 @@
/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
#cmakedefine01 LLVM_ENABLE_DIA_SDK

/* Define if plugins enabled */
#cmakedefine LLVM_ENABLE_PLUGINS

#endif
6 changes: 0 additions & 6 deletions llvm/unittests/Passes/CMakeLists.txt
@@ -1,12 +1,6 @@
# Needed by LLVM's CMake checks because this file defines multiple targets.
set(LLVM_OPTIONAL_SOURCES PluginsTest.cpp TestPlugin.cpp DoublerPlugin.cpp PassBuilderBindingsTest.cpp)

# If plugins are disabled, this test will disable itself at runtime. Otherwise,
# reconfiguring with plugins disabled will leave behind a stale executable.
if (LLVM_ENABLE_PLUGINS)
add_definitions(-DLLVM_ENABLE_PLUGINS)
endif()

# The plugin expects to not link against the Support and Core 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
Expand Down

0 comments on commit 7d2c115

Please sign in to comment.