1if(LLVM_EXAMPLEIRTRANSFORMS_LINK_INTO_TOOLS) 2 message(WARNING "Setting LLVM_EXAMPLEIRTRANSFORMS_LINK_INTO_TOOLS=ON only makes sense for testing purpose") 3endif() 4 5# The plugin expects to not link against the Support and Core libraries, 6# but expects them to exist in the process loading the plugin. This doesn't 7# work with DLLs on Windows (where a shared library can't have undefined 8# references), so just skip this example on Windows. 9if (NOT WIN32) 10 add_llvm_pass_plugin(ExampleIRTransforms 11 SimplifyCFG.cpp 12 DEPENDS 13 intrinsics_gen 14 BUILDTREE_ONLY 15 ) 16 17 install(TARGETS ${name} RUNTIME DESTINATION "${LLVM_EXAMPLES_INSTALL_DIR}") 18 set_target_properties(${name} PROPERTIES FOLDER "Examples") 19endif() 20