beanz added a comment. After line 18 in this file you could do something like: if(WITH_POLLY) list(APPEND LLVM_LINK_COMPONENTS Polly) endif() Then you can get rid of the `target_link_libraries` call. Repository: rC Clang https://reviews.llvm.org/D51986