diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-08-05 21:07:07 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-08-05 21:07:07 +0000 |
commit | 5a328054f33783527bd65bd4928b5537113b365c (patch) | |
tree | 76335737849ba4deb9d8312c73e5abd1b144fa96 /tools | |
parent | acf4cf775763c6896f14f1d3a988058de05ca704 (diff) | |
download | llvm-5a328054f33783527bd65bd4928b5537113b365c.tar.gz llvm-5a328054f33783527bd65bd4928b5537113b365c.tar.bz2 llvm-5a328054f33783527bd65bd4928b5537113b365c.tar.xz |
[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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/OptimizerDriver.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bugpoint/OptimizerDriver.cpp b/tools/bugpoint/OptimizerDriver.cpp index 0c39b9d6fc..20c609cc31 100644 --- a/tools/bugpoint/OptimizerDriver.cpp +++ b/tools/bugpoint/OptimizerDriver.cpp @@ -44,6 +44,9 @@ namespace { // ChildOutput - This option captures the name of the child output file that // is set up by the parent bugpoint process cl::opt<std::string> ChildOutput("child-output", cl::ReallyHidden); + cl::opt<std::string> OptCmd("opt-command", cl::init(""), + cl::desc("Path to opt. (default: search path " + "for 'opt'.)")); } /// writeProgramToFile - This writes the current "Program" to the named bitcode @@ -154,7 +157,7 @@ bool BugDriver::runPasses(Module *Program, return 1; } - std::string tool = sys::FindProgramByName("opt"); + std::string tool = OptCmd.empty()? sys::FindProgramByName("opt") : OptCmd; if (tool.empty()) { errs() << "Cannot find `opt' in PATH!\n"; return 1; |