Currently we search for the llvm-symbolizer binary along $PATH. This doesn't work very well if the LLVM binary is run from the build area, or is installed in some directory that's not on the $PATH. This patch changes the crash reporter to look for the symbolizer binary in directory of argv[0] before it searches $PATH; most of the changes here are wiring argv[0] from each of our main functions through to the crash reporter.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Support/Signals.cpp | ||
---|---|---|
85–86 | So, if 'clang' was on PATH, argv0 would be 'clang', parent_path will return an empty string, and then we'll try './llvm-symbolizer'? Are you sure that's what we want? Maybe just skip to the PATH search in that case? |
lib/Support/Signals.cpp | ||
---|---|---|
85–86 | argv[0] typically has the corresponding element of $PATH prepended to it in that case, but I agree it makes sense to skip the search entirely if we get a weird argv[0] rather than searching in .. |
projects/libcxx/include/algorithm | ||
---|---|---|
637 | Ignore this, I diffed too many subprojects :) |
So, if 'clang' was on PATH, argv0 would be 'clang', parent_path will return an empty string, and then we'll try './llvm-symbolizer'? Are you sure that's what we want? Maybe just skip to the PATH search in that case?