summaryrefslogtreecommitdiff
path: root/tools/bugpoint
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2014-03-14 04:04:14 +0000
committerSebastian Pop <spop@codeaurora.org>2014-03-14 04:04:14 +0000
commitbeaa95d97f319dc9b93b89850ab2ed9790182166 (patch)
tree75e0fc199ec98fa57d0fb06b200098b3568a0a29 /tools/bugpoint
parent757ed6daf4c7720cddebdc3f502f7ecb110ded72 (diff)
downloadllvm-beaa95d97f319dc9b93b89850ab2ed9790182166.tar.gz
llvm-beaa95d97f319dc9b93b89850ab2ed9790182166.tar.bz2
llvm-beaa95d97f319dc9b93b89850ab2ed9790182166.tar.xz
static link polly into tools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203886 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint')
-rw-r--r--tools/bugpoint/CMakeLists.txt9
-rw-r--r--tools/bugpoint/bugpoint.cpp10
2 files changed, 19 insertions, 0 deletions
diff --git a/tools/bugpoint/CMakeLists.txt b/tools/bugpoint/CMakeLists.txt
index b537a5d237..d71e097918 100644
--- a/tools/bugpoint/CMakeLists.txt
+++ b/tools/bugpoint/CMakeLists.txt
@@ -32,3 +32,12 @@ add_llvm_tool(bugpoint
bugpoint.cpp
)
set_target_properties(bugpoint PROPERTIES ENABLE_EXPORTS 1)
+
+if(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
+ target_link_libraries(bugpoint Polly)
+ if(POLLY_LINK_LIBS)
+ foreach(lib ${POLLY_LINK_LIBS})
+ target_link_libraries(bugpoint ${lib})
+ endforeach(lib)
+ endif(POLLY_LINK_LIBS)
+endif(WITH_POLLY AND LINK_POLLY_INTO_TOOLS)
diff --git a/tools/bugpoint/bugpoint.cpp b/tools/bugpoint/bugpoint.cpp
index b79434080d..5c03b41abb 100644
--- a/tools/bugpoint/bugpoint.cpp
+++ b/tools/bugpoint/bugpoint.cpp
@@ -109,6 +109,12 @@ namespace {
};
}
+#ifdef LINK_POLLY_INTO_TOOLS
+namespace polly {
+void initializePollyPasses(llvm::PassRegistry &Registry);
+}
+#endif
+
int main(int argc, char **argv) {
#ifndef DEBUG_BUGPOINT
llvm::sys::PrintStackTraceOnErrorSignal();
@@ -130,6 +136,10 @@ int main(int argc, char **argv) {
initializeInstrumentation(Registry);
initializeTarget(Registry);
+#ifdef LINK_POLLY_INTO_TOOLS
+ polly::initializePollyPasses(Registry);
+#endif
+
cl::ParseCommandLineOptions(argc, argv,
"LLVM automatic testcase reducer. See\nhttp://"
"llvm.org/cmds/bugpoint.html"