diff --git a/llvm/tools/llvm-lto2/llvm-lto2.cpp b/llvm/tools/llvm-lto2/llvm-lto2.cpp --- a/llvm/tools/llvm-lto2/llvm-lto2.cpp +++ b/llvm/tools/llvm-lto2/llvm-lto2.cpp @@ -17,6 +17,7 @@ #include "llvm/Bitcode/BitcodeReader.h" #include "llvm/CodeGen/CommandFlags.h" +#include "llvm/Config/llvm-config.h" #include "llvm/IR/DiagnosticPrinter.h" #include "llvm/LTO/Caching.h" #include "llvm/LTO/LTO.h" @@ -144,7 +145,7 @@ static cl::opt UseNewPM("use-new-pm", cl::desc("Run LTO passes using the new pass manager"), - cl::init(false), cl::Hidden); + cl::init(LLVM_ENABLE_NEW_PASS_MANAGER), cl::Hidden); static cl::opt DebugPassManager("debug-pass-manager", cl::init(false), cl::Hidden,