Index: llvm/trunk/tools/bugpoint/CMakeLists.txt =================================================================== --- llvm/trunk/tools/bugpoint/CMakeLists.txt +++ llvm/trunk/tools/bugpoint/CMakeLists.txt @@ -1,4 +1,5 @@ set(LLVM_LINK_COMPONENTS + ${LLVM_TARGETS_TO_BUILD} Analysis BitWriter CodeGen Index: llvm/trunk/tools/bugpoint/LLVMBuild.txt =================================================================== --- llvm/trunk/tools/bugpoint/LLVMBuild.txt +++ llvm/trunk/tools/bugpoint/LLVMBuild.txt @@ -30,3 +30,4 @@ Linker ObjCARC Scalar + all-targets Index: llvm/trunk/tools/bugpoint/bugpoint.cpp =================================================================== --- llvm/trunk/tools/bugpoint/bugpoint.cpp +++ llvm/trunk/tools/bugpoint/bugpoint.cpp @@ -26,6 +26,7 @@ #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Process.h" #include "llvm/Support/Signals.h" +#include "llvm/Support/TargetSelect.h" #include "llvm/Support/Valgrind.h" #include "llvm/Transforms/IPO/AlwaysInliner.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" @@ -138,6 +139,14 @@ polly::initializePollyPasses(Registry); #endif + if (std::getenv("bar") == (char*) -1) { + InitializeAllTargets(); + InitializeAllTargetMCs(); + InitializeAllAsmPrinters(); + InitializeAllAsmParsers(); + InitializeAllDisassemblers(); + } + cl::ParseCommandLineOptions(argc, argv, "LLVM automatic testcase reducer. See\nhttp://" "llvm.org/cmds/bugpoint.html"