llvm.org GIT mirror llvm / 5a32805
[bugpoint] Allow the user to specify the path to opt on the commandline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187739 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Gottesman 6 years ago
1 changed file(s) with 4 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4343 // ChildOutput - This option captures the name of the child output file that
4444 // is set up by the parent bugpoint process
4545 cl::opt ChildOutput("child-output", cl::ReallyHidden);
46 cl::opt OptCmd("opt-command", cl::init(""),
47 cl::desc("Path to opt. (default: search path "
48 "for 'opt'.)"));
4649 }
4750
4851 /// writeProgramToFile - This writes the current "Program" to the named bitcode
153156 return 1;
154157 }
155158
156 std::string tool = sys::FindProgramByName("opt");
159 std::string tool = OptCmd.empty()? sys::FindProgramByName("opt") : OptCmd;
157160 if (tool.empty()) {
158161 errs() << "Cannot find `opt' in PATH!\n";
159162 return 1;