add_llvm_library(Attribute MODULE Attribute.cpp PLUGIN_TOOL clang)
if(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
- target_link_libraries(AnnotateFunctions ${cmake_2_8_12_PRIVATE}
+ target_link_libraries(Attribute ${cmake_2_8_12_PRIVATE}
clangAST
clangBasic
clangFrontend
message(WARNING "Setting LLVM_BYE_LINK_INTO_TOOLS=ON only makes sense for testing purpose")
endif()
-add_llvm_pass_plugin(Bye
- Bye.cpp
- DEPENDS
- intrinsics_gen
- BUILDTREE_ONLY
- )
+# 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
+# references), so just skip this testcase on Windows.
+if (NOT WIN32)
+ add_llvm_pass_plugin(Bye
+ Bye.cpp
+ DEPENDS
+ intrinsics_gen
+ BUILDTREE_ONLY
+ )
-install(TARGETS ${name} RUNTIME DESTINATION examples)
-set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ install(TARGETS ${name} RUNTIME DESTINATION examples)
+ set_target_properties(${name} PROPERTIES FOLDER "Examples")
+endif()