diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index 771bce1f1526..fd6b81774b26 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -342,7 +342,7 @@ option(LLVM_USE_SPLIT_DWARF "Use -gsplit-dwarf when compiling llvm." OFF) option(WITH_POLLY "Build LLVM with Polly" ON) -option(LINK_POLLY_INTO_TOOLS "Static link Polly into tools" OFF) +option(LINK_POLLY_INTO_TOOLS "Static link Polly into tools" ON) # Define an option controlling whether we should build for 32-bit on 64-bit # platforms, where supported. @@ -393,6 +393,16 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF) option (LLVM_BUILD_EXTERNAL_COMPILER_RT "Build compiler-rt as an external project." OFF) +if(WITH_POLLY) + if(NOT EXISTS ${LLVM_MAIN_SRC_DIR}/tools/polly/CMakeLists.txt) + set(WITH_POLLY OFF) + endif() +endif(WITH_POLLY) + +if (NOT WITH_POLLY) + set(LINK_POLLY_INTO_TOOLS OFF) +endif (NOT WITH_POLLY) + # You can configure which libraries from LLVM you want to include in the # shared library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited # list of LLVM components. All component names handled by llvm-config are valid. @@ -702,12 +712,6 @@ endforeach() add_subdirectory(projects) -if(WITH_POLLY) - if(NOT EXISTS ${LLVM_MAIN_SRC_DIR}/tools/polly/CMakeLists.txt) - set(WITH_POLLY OFF) - endif() -endif(WITH_POLLY) - if( LLVM_INCLUDE_TOOLS ) add_subdirectory(tools) endif() diff --git a/llvm/tools/CMakeLists.txt b/llvm/tools/CMakeLists.txt index 8ca7bae8971f..19178b37c6b5 100644 --- a/llvm/tools/CMakeLists.txt +++ b/llvm/tools/CMakeLists.txt @@ -16,6 +16,10 @@ if(WITH_POLLY) else() set(LLVM_TOOL_POLLY_BUILD Off) endif() +if(NOT LLVM_TOOL_POLL_BUILD) + MESSAGE(No polly) +endif() + if(NOT LLVM_BUILD_LLVM_DYLIB ) set(LLVM_TOOL_LLVM_SHLIB_BUILD Off)