mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
6313b3229a
This commit fixes the detection of the revng-c include file in build directory, using the PathList facility provided by revng. Before this commit, running revng-c from build directory failed to properly identify the revng-c include if it was not already installed but only available in the build directory itself.
31 lines
471 B
C++
31 lines
471 B
C++
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
// LLVM includes
|
|
#include <llvm/Support/Path.h>
|
|
|
|
#include "revng-c/DecompilerResourceFinder/ResourceFinder.h"
|
|
|
|
namespace revng {
|
|
|
|
namespace c {
|
|
|
|
class PathList ResourceFinder({
|
|
|
|
#ifdef BUILD_PATH
|
|
BUILD_PATH,
|
|
#endif
|
|
|
|
llvm::sys::path::parent_path(getCurrentExecutableFullPath()).str(),
|
|
|
|
#ifdef INSTALL_PATH
|
|
INSTALL_PATH,
|
|
#endif
|
|
|
|
});
|
|
|
|
} // end namespace c
|
|
|
|
} // end namespace revng
|