mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 16:45:59 +01:00
pluginAPI: make symbols static
This commit is contained in:
parent
8b3d8dc792
commit
b4f75525d9
1 changed files with 6 additions and 6 deletions
|
@ -274,20 +274,20 @@ APICALL std::vector<SFunctionMatch> HyprlandAPI::findFunctionsByName(HANDLE hand
|
||||||
const auto FPATH = std::filesystem::canonical(exe);
|
const auto FPATH = std::filesystem::canonical(exe);
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
// Neither KERN_PROC_PATHNAME nor /proc are supported
|
// Neither KERN_PROC_PATHNAME nor /proc are supported
|
||||||
const auto FPATH = std::filesystem::canonical("/usr/local/bin/Hyprland");
|
const auto FPATH = std::filesystem::canonical("/usr/local/bin/Hyprland");
|
||||||
#else
|
#else
|
||||||
const auto FPATH = std::filesystem::canonical("/proc/self/exe");
|
const auto FPATH = std::filesystem::canonical("/proc/self/exe");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
const auto SYMBOLS = execAndGet(("llvm-nm -D -j " + FPATH.string()).c_str());
|
static const auto SYMBOLS = execAndGet(("llvm-nm -D -j " + FPATH.string()).c_str());
|
||||||
const auto SYMBOLSDEMANGLED = execAndGet(("llvm-nm -D -j --demangle " + FPATH.string()).c_str());
|
static const auto SYMBOLSDEMANGLED = execAndGet(("llvm-nm -D -j --demangle " + FPATH.string()).c_str());
|
||||||
#else
|
#else
|
||||||
const auto SYMBOLS = execAndGet(("nm -D -j " + FPATH.string()).c_str());
|
static const auto SYMBOLS = execAndGet(("nm -D -j " + FPATH.string()).c_str());
|
||||||
const auto SYMBOLSDEMANGLED = execAndGet(("nm -D -j --demangle=auto " + FPATH.string()).c_str());
|
static const auto SYMBOLSDEMANGLED = execAndGet(("nm -D -j --demangle=auto " + FPATH.string()).c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto demangledFromID = [&](size_t id) -> std::string {
|
auto demangledFromID = [&](size_t id) -> std::string {
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
size_t count = 0;
|
size_t count = 0;
|
||||||
while (count < id) {
|
while (count < id) {
|
||||||
|
|
Loading…
Reference in a new issue