diff options
author | serge-sans-paille <sguelton@redhat.com> | 2020-01-10 10:05:30 +0100 |
---|---|---|
committer | serge-sans-paille <sguelton@redhat.com> | 2020-01-10 10:10:20 +0100 |
commit | 346de9b67228f42eb9b55fa3b426b5dedfdb1d40 (patch) | |
tree | d7c3e318b3af41b1d65bf2863bb4c795d382394b /llvm/examples | |
parent | abfa27e4f04dd84774bcfe15783942e21be391a5 (diff) | |
download | bcm5719-llvm-346de9b67228f42eb9b55fa3b426b5dedfdb1d40.tar.gz bcm5719-llvm-346de9b67228f42eb9b55fa3b426b5dedfdb1d40.zip |
Fix several issues with compiler extensions
- Update documentation now that the move to monorepo has been made
- Do not tie compiler extension testing to LLVM_BUILD_EXAMPLES
- No need to specify LLVM libraries for plugins
- Add NO_MODULE option to match Polly specific requirements (i.e. building the
module *and* linking it statically)
- Issue a warning when building the compiler extension with
LLVM_BYE_LINK_INTO_TOOLS=ON, as it modifies the behavior of clang, which only
makes sense for testing purpose.
Still mark llvm/test/Feature/load_extension.ll as XFAIL because of a
ManagedStatic dependency that's going to be fixed in a seperate commit.
Differential Revision: https://reviews.llvm.org/D72327
Diffstat (limited to 'llvm/examples')
-rw-r--r-- | llvm/examples/Bye/CMakeLists.txt | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/llvm/examples/Bye/CMakeLists.txt b/llvm/examples/Bye/CMakeLists.txt index a6767209491..3206f90d091 100644 --- a/llvm/examples/Bye/CMakeLists.txt +++ b/llvm/examples/Bye/CMakeLists.txt @@ -1,23 +1,13 @@ -add_llvm_pass_plugin(Bye - Bye.cpp - DEPENDS - intrinsics_gen - BUILDTREE_ONLY - ) - -if (LLVM_LINK_LLVM_DYLIB) - target_link_libraries(Bye PUBLIC LLVM) -else() - target_link_libraries(Bye - PUBLIC - LLVMSupport - LLVMCore - LLVMipo - LLVMPasses - ) +if(LLVM_BYE_LINK_INTO_TOOLS) + message(WARNING "Setting LLVM_BYE_LINK_INTO_TOOLS=ON only makes sense for testing purpose") endif() -if( LLVM_BUILD_EXAMPLES ) - install(TARGETS ${name} RUNTIME DESTINATION examples) -endif() +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") |