llvm-project/llvm/tools/bugpoint
Brian Gesiak 5cc8920d02 [bugpoint] Find 'opt', etc., in bugpoint directory
Summary:
When bugpoint attempts to find the other executables it needs to run,
such as `opt` or `clang`, it tries searching the user's PATH. However,
in many cases, the 'bugpoint' executable is part of an LLVM build, and
the 'opt' executable it's looking for is in that same directory.

Many LLVM tools handle this case by using the `Paths` parameter of
`llvm::sys::findProgramByName`, passing the parent path of the currently
running executable. Do this same thing for bugpoint. However, to
preserve the current behavior exactly, first search the user's PATH,
and then search for 'opt' in the directory containing 'bugpoint'.

Test Plan:
`check-llvm`. Many of the existing bugpoint tests no longer need to use the
`--opt-command` option as a result of these changes.

Reviewers: MatzeB, silvas, davide

Reviewed By: MatzeB, davide

Subscribers: davide, llvm-commits

Differential Revision: https://reviews.llvm.org/D54884

llvm-svn: 348734
2018-12-10 00:56:13 +00:00
..
BugDriver.cpp Change the BugDriver to store the current module with std::unique_ptr. 2018-02-14 21:44:34 +00:00
BugDriver.h [bugpoint] Fix crash when testing for miscompilation. 2018-04-24 20:15:27 +00:00
CMakeLists.txt Link to AggressiveInstCombine in a few places. Unbreaks build for me. 2018-04-24 08:40:37 +00:00
CrashDebugger.cpp [TI removal] Make `getTerminator()` return a generic `Instruction`. 2018-10-15 10:42:50 +00:00
ExecutionDriver.cpp [bugpoint] Find 'opt', etc., in bugpoint directory 2018-12-10 00:56:13 +00:00
ExtractFunction.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
FindBugs.cpp Change the BugDriver to store the current module with std::unique_ptr. 2018-02-14 21:44:34 +00:00
LLVMBuild.txt Ensure backends available in 'opt' are also available in 'bugpoint' 2017-06-24 08:09:33 +00:00
ListReducer.h
Miscompilation.cpp [bugpoint] Fix crash when testing for miscompilation. 2018-04-24 20:15:27 +00:00
OptimizerDriver.cpp [bugpoint] Find 'opt', etc., in bugpoint directory 2018-12-10 00:56:13 +00:00
ToolRunner.cpp [bugpoint] Find 'opt', etc., in bugpoint directory 2018-12-10 00:56:13 +00:00
ToolRunner.h [bugpoint] Find 'opt', etc., in bugpoint directory 2018-12-10 00:56:13 +00:00
bugpoint.cpp IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00